diff options
Diffstat (limited to 'source3/libsmb')
-rw-r--r-- | source3/libsmb/namequery.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source3/libsmb/namequery.c b/source3/libsmb/namequery.c index dcb7dbf070..4c361a3716 100644 --- a/source3/libsmb/namequery.c +++ b/source3/libsmb/namequery.c @@ -111,7 +111,6 @@ char *saf_fetch( const char *domain ) return server; } - /**************************************************************************** Generate a random trn_id. ****************************************************************************/ @@ -1044,6 +1043,7 @@ static BOOL resolve_ads(const char *name, int name_type, status = ads_dns_query_dcs( ctx, name, &dcs, &numdcs ); if ( !NT_STATUS_IS_OK( status ) ) { + talloc_destroy(ctx); return False; } @@ -1053,6 +1053,7 @@ static BOOL resolve_ads(const char *name, int name_type, if ( (*return_iplist = SMB_MALLOC_ARRAY(struct ip_service, numaddrs)) == NULL ) { DEBUG(0,("resolve_ads: malloc failed for %d entries\n", numaddrs )); + talloc_destroy(ctx); return False; } @@ -1096,8 +1097,7 @@ static BOOL resolve_ads(const char *name, int name_type, (*return_count)++; } - TALLOC_FREE( dcs ); - + talloc_destroy(ctx); return True; } |