git.samba.org
/
jra
/
samba
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
83c2f02
)
Fix Coverity ID 707 (RESOURCE_LEAK)
author
Volker Lendecke
<vl@samba.org>
Fri, 13 Feb 2009 09:19:26 +0000
(10:19 +0100)
committer
Volker Lendecke
<vl@samba.org>
Fri, 13 Feb 2009 09:21:03 +0000
(10:21 +0100)
lib/util/util.c
patch
|
blob
|
history
diff --git
a/lib/util/util.c
b/lib/util/util.c
index 7548d30b7ef80bba8f40f0f4a6cddbc481d41f21..40ac7f79e69578a43cf24fb3a275172c8663f12c 100644
(file)
--- a/
lib/util/util.c
+++ b/
lib/util/util.c
@@
-206,6
+206,7
@@
_PUBLIC_ char *get_myname(void)
/* get my host name */
if (gethostname(hostname, MAXHOSTNAMELEN+1) == -1) {
DEBUG(0,("gethostname failed\n"));
/* get my host name */
if (gethostname(hostname, MAXHOSTNAMELEN+1) == -1) {
DEBUG(0,("gethostname failed\n"));
+ free(hostname);
return NULL;
}
return NULL;
}