From 0c0232e072cb37e309693117816fcdd93ae25643 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Thu, 28 Aug 2008 19:20:11 +0200 Subject: [PATCH] socket: fix memory leak Signed-off-by: Julien Danjou --- common/socket.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common/socket.c b/common/socket.c index ed287b99..9ca424a9 100644 --- a/common/socket.c +++ b/common/socket.c @@ -56,6 +56,8 @@ socket_getaddr(const char *display) homedir, host, a_strlen(host) ? "." : "", displayp); + p_delete(&host); + if(path_len >= ssizeof(addr->sun_path)) { fprintf(stderr, "error: path of control UNIX domain socket is too long");