socket: fix memory leak

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2008-08-28 19:20:11 +02:00
parent ef7d08c027
commit 0c0232e072
1 changed files with 2 additions and 0 deletions

View File

@ -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");