socket: fix memory leak
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
ef7d08c027
commit
0c0232e072
|
@ -56,6 +56,8 @@ socket_getaddr(const char *display)
|
||||||
homedir, host, a_strlen(host) ? "." : "",
|
homedir, host, a_strlen(host) ? "." : "",
|
||||||
displayp);
|
displayp);
|
||||||
|
|
||||||
|
p_delete(&host);
|
||||||
|
|
||||||
if(path_len >= ssizeof(addr->sun_path))
|
if(path_len >= ssizeof(addr->sun_path))
|
||||||
{
|
{
|
||||||
fprintf(stderr, "error: path of control UNIX domain socket is too long");
|
fprintf(stderr, "error: path of control UNIX domain socket is too long");
|
||||||
|
|
Loading…
Reference in New Issue