From: Günther Deschner Date: Thu, 3 May 2007 20:12:00 +0000 (+0000) Subject: r22655: Call correct free-macros in netsamlogon_cache_get() error paths. Forgot those X-Git-Tag: samba-misc-tags/initial-v3-0-unstable~558 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=fce2fe9903417f4ee58a1ddc03ad0083109b7c50;p=thirdparty%2Fsamba.git r22655: Call correct free-macros in netsamlogon_cache_get() error paths. Forgot those in the previous commit. Guenther --- diff --git a/source/libsmb/samlogon_cache.c b/source/libsmb/samlogon_cache.c index 0791cd80e48..106ff21dfe4 100644 --- a/source/libsmb/samlogon_cache.c +++ b/source/libsmb/samlogon_cache.c @@ -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 }