summaryrefslogtreecommitdiff
path: root/source3/lib/util_sock.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/lib/util_sock.c')
-rw-r--r--source3/lib/util_sock.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/source3/lib/util_sock.c b/source3/lib/util_sock.c
index 10428113ae..a3975f6c1f 100644
--- a/source3/lib/util_sock.c
+++ b/source3/lib/util_sock.c
@@ -2080,14 +2080,15 @@ const char *get_mydnsfullname(void)
data_blob_string_const("get_mydnsfullname"),
data_blob_string_const(res->ai_canonname));
- freeaddrinfo(res);
-
if (!memcache_lookup(NULL, SINGLETON_CACHE,
data_blob_string_const("get_mydnsfullname"),
&tmp)) {
- return NULL;
+ tmp = data_blob_talloc(talloc_tos(), res->ai_canonname,
+ strlen(res->ai_canonname) + 1);
}
+ freeaddrinfo(res);
+
return (const char *)tmp.data;
}