summaryrefslogtreecommitdiff
path: root/source3/libads/sitename_cache.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/libads/sitename_cache.c')
-rw-r--r--source3/libads/sitename_cache.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source3/libads/sitename_cache.c b/source3/libads/sitename_cache.c
index b0c4423106..b064aea139 100644
--- a/source3/libads/sitename_cache.c
+++ b/source3/libads/sitename_cache.c
@@ -79,7 +79,7 @@ bool sitename_store(const char *realm, const char *sitename)
Caller must free.
****************************************************************************/
-char *sitename_fetch(const char *realm)
+char *sitename_fetch(TALLOC_CTX *mem_ctx, const char *realm)
{
char *sitename = NULL;
time_t timeout;
@@ -95,7 +95,7 @@ char *sitename_fetch(const char *realm)
key = sitename_key(query_realm);
- ret = gencache_get( key, NULL, &sitename, &timeout );
+ ret = gencache_get( key, mem_ctx, &sitename, &timeout );
SAFE_FREE(key);
if ( !ret ) {
DEBUG(5,("sitename_fetch: No stored sitename for %s\n",
@@ -122,7 +122,7 @@ bool stored_sitename_changed(const char *realm, const char *sitename)
return False;
}
- new_sitename = sitename_fetch(realm);
+ new_sitename = sitename_fetch(talloc_tos(), realm);
if (sitename && new_sitename && !strequal(sitename, new_sitename)) {
ret = True;
@@ -130,7 +130,7 @@ bool stored_sitename_changed(const char *realm, const char *sitename)
(!sitename && new_sitename)) {
ret = True;
}
- SAFE_FREE(new_sitename);
+ TALLOC_FREE(new_sitename);
return ret;
}