r22655: Call correct free-macros in netsamlogon_cache_get() error paths. Forgot those
authorGünther Deschner <gd@samba.org>
Thu, 3 May 2007 20:12:00 +0000 (20:12 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 17:19:53 +0000 (12:19 -0500)
in the previous commit.

Guenther
(This used to be commit fce2fe9903417f4ee58a1ddc03ad0083109b7c50)

source3/libsmb/samlogon_cache.c

index 0791cd80e4884f460461a4cbbad01bb214d10b58..106ff21dfe4c227edf9f73d389f02917c0dd78c5 100644 (file)
@@ -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
        }