summaryrefslogtreecommitdiff
path: root/source4/libcli
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-08-25 02:07:53 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:58:19 -0500
commitb13a9a8f98469fffe0db4cce7e077390d35984a3 (patch)
treec27bdf26abd127d6884215ac2654161d805ffea3 /source4/libcli
parent600144050ce8e4515937c87be8d2c86c2c337364 (diff)
downloadsamba-b13a9a8f98469fffe0db4cce7e077390d35984a3.tar.gz
samba-b13a9a8f98469fffe0db4cce7e077390d35984a3.tar.bz2
samba-b13a9a8f98469fffe0db4cce7e077390d35984a3.zip
r2040: fixed a memory handling error in clisocket (caught with valgrind)
(This used to be commit f6dc62bf119c294db060b0870b6ca80bc28bd4a5)
Diffstat (limited to 'source4/libcli')
-rw-r--r--source4/libcli/raw/clisocket.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source4/libcli/raw/clisocket.c b/source4/libcli/raw/clisocket.c
index 94bb447f47..1004db4040 100644
--- a/source4/libcli/raw/clisocket.c
+++ b/source4/libcli/raw/clisocket.c
@@ -173,9 +173,9 @@ BOOL smbcli_sock_connect_byname(struct smbcli_socket *sock, const char *host, in
if (ret) {
sock->hostname = talloc_steal(sock, name);
+ } else {
+ talloc_free(name);
}
- talloc_destroy(name);
-
return ret;
}