summaryrefslogtreecommitdiff
path: root/source3/libsmb
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2013-09-04 13:39:31 -0700
committerJeremy Allison <jra@samba.org>2013-09-05 09:17:13 -0700
commit6b915bfd0f4194453c1b01158f2c2772b2a2df2f (patch)
treec1fcb0b1b0ff7abba4d2e27b7b853ce9b6926ed3 /source3/libsmb
parent8a7246ac2c5b27cc29e6ca23c1e2e0f43e298eb5 (diff)
downloadsamba-6b915bfd0f4194453c1b01158f2c2772b2a2df2f.tar.gz
samba-6b915bfd0f4194453c1b01158f2c2772b2a2df2f.tar.bz2
samba-6b915bfd0f4194453c1b01158f2c2772b2a2df2f.zip
Add a talloc context to saf_fetch().
Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
Diffstat (limited to 'source3/libsmb')
-rw-r--r--source3/libsmb/namequery.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source3/libsmb/namequery.c b/source3/libsmb/namequery.c
index 15c7cacae5..7fac0c97f8 100644
--- a/source3/libsmb/namequery.c
+++ b/source3/libsmb/namequery.c
@@ -165,7 +165,7 @@ bool saf_delete( const char *domain )
/****************************************************************************
****************************************************************************/
-char *saf_fetch( const char *domain )
+char *saf_fetch(TALLOC_CTX *mem_ctx, const char *domain )
{
char *server = NULL;
time_t timeout;
@@ -183,7 +183,7 @@ char *saf_fetch( const char *domain )
return NULL;
}
- ret = gencache_get( key, NULL, &server, &timeout );
+ ret = gencache_get( key, mem_ctx, &server, &timeout );
TALLOC_FREE( key );
@@ -199,7 +199,7 @@ char *saf_fetch( const char *domain )
return NULL;
}
- ret = gencache_get( key, NULL, &server, &timeout );
+ ret = gencache_get( key, mem_ctx, &server, &timeout );
TALLOC_FREE( key );
@@ -3073,7 +3073,7 @@ static NTSTATUS get_dc_list(const char *domain,
/* fetch the server we have affinity for. Add the
'password server' list to a search for our domain controllers */
- saf_servername = saf_fetch( domain);
+ saf_servername = saf_fetch(ctx, domain);
if (strequal(domain, lp_workgroup()) || strequal(domain, lp_realm())) {
pserver = talloc_asprintf(ctx, "%s, %s",
@@ -3084,7 +3084,7 @@ static NTSTATUS get_dc_list(const char *domain,
saf_servername ? saf_servername : "");
}
- SAFE_FREE(saf_servername);
+ TALLOC_FREE(saf_servername);
if (!pserver) {
status = NT_STATUS_NO_MEMORY;
goto out;