r23779: Change from v2 or later to v3 or later.
[ira/wip.git] / source3 / libsmb / samlogon_cache.c
index 0791cd80e4884f460461a4cbbad01bb214d10b58..c58f3b212df525685ebfd3b53e57b20fe0855137 100644 (file)
@@ -8,7 +8,7 @@
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
+   the Free Software Foundation; either version 3 of the License, or
    (at your option) any later version.
    
    This program is distributed in the hope that it will be useful,
@@ -193,7 +193,6 @@ NET_USER_INFO_3* netsamlogon_cache_get( TALLOC_CTX *mem_ctx, const DOM_SID *user
        
        if ( data.dptr ) {
 
-
                user = TALLOC_ZERO_P(mem_ctx, NET_USER_INFO_3);
                if (user == NULL) {
                        return NULL;
@@ -204,12 +203,12 @@ NET_USER_INFO_3* netsamlogon_cache_get( TALLOC_CTX *mem_ctx, const DOM_SID *user
                
                if ( !prs_uint32( "timestamp", &ps, 0, &t ) ) {
                        prs_mem_free( &ps );
-                       SAFE_FREE(user);
+                       TALLOC_FREE(user);
                        return False;
                }
                
                if ( !net_io_user_info3("", user, &ps, 0, 3, 0) ) {
-                       SAFE_FREE( user );
+                       TALLOC_FREE( user );
                }
                        
                prs_mem_free( &ps );
@@ -228,7 +227,7 @@ NET_USER_INFO_3* netsamlogon_cache_get( TALLOC_CTX *mem_ctx, const DOM_SID *user
                if ( (time_diff < 0 ) || (time_diff > lp_winbind_cache_time()) ) {
                        DEBUG(10,("netsamlogon_cache_get: cache entry expired \n"));
                        tdb_delete( netsamlogon_tdb, key );
-                       SAFE_FREE( user );
+                       TALLOC_FREE( user );
                }
 #endif
        }