From b13a9a8f98469fffe0db4cce7e077390d35984a3 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 25 Aug 2004 02:07:53 +0000 Subject: r2040: fixed a memory handling error in clisocket (caught with valgrind) (This used to be commit f6dc62bf119c294db060b0870b6ca80bc28bd4a5) --- source4/libcli/raw/clisocket.c | 4 ++-- 1 file 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; } -- cgit