git.samba.org
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
9a22653
)
util_sock: Don't return a pointer to freed memory.
author
Kai Blin
<kai@samba.org>
Mon, 21 Jan 2008 17:01:55 +0000
(18:01 +0100)
committer
Kai Blin
<kai@samba.org>
Mon, 21 Jan 2008 17:02:24 +0000
(18:02 +0100)
Fix a bug in my bugfix. Thanks to vl for spotting that one.
(This used to be commit
24f68b90cca111256a7b03f7062cb57c2b08a0d6
)
source3/lib/util_sock.c
patch
|
blob
|
history
diff --git
a/source3/lib/util_sock.c
b/source3/lib/util_sock.c
index f524d0d82623ce4d32704624c53bdd9827f078e1..a3975f6c1f2d5712d70fee5c33387bd0ebf56c6e 100644
(file)
--- a/
source3/lib/util_sock.c
+++ b/
source3/lib/util_sock.c
@@
-2083,7
+2083,8
@@
const char *get_mydnsfullname(void)
if (!memcache_lookup(NULL, SINGLETON_CACHE,
data_blob_string_const("get_mydnsfullname"),
&tmp)) {
- tmp = data_blob_string_const(res->ai_canonname);
+ tmp = data_blob_talloc(talloc_tos(), res->ai_canonname,
+ strlen(res->ai_canonname) + 1);
}
freeaddrinfo(res);