diff options
author | Andrew Tridgell <tridge@samba.org> | 2004-08-25 02:07:53 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:58:19 -0500 |
commit | b13a9a8f98469fffe0db4cce7e077390d35984a3 (patch) | |
tree | c27bdf26abd127d6884215ac2654161d805ffea3 /source4 | |
parent | 600144050ce8e4515937c87be8d2c86c2c337364 (diff) | |
download | samba-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')
-rw-r--r-- | source4/libcli/raw/clisocket.c | 4 |
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; } |