Commit 2d6d0d2a authored by Frediano Ziglio's avatar Frediano Ziglio
Browse files

udscs: Avoid file descriptor leak



If connection fails the socket descriptor is not closed causing
a leak.
Signed-off-by: Frediano Ziglio's avatarFrediano Ziglio <fziglio@redhat.com>
Acked-by: Victor Toso's avatarVictor Toso <victortoso@redhat.com>
parent 102b2e75
......@@ -119,6 +119,7 @@ struct udscs_connection *udscs_connect(const char *socketname,
if (conn->debug) {
syslog(LOG_DEBUG, "connect %s: %m", socketname);
}
close(conn->fd);
g_free(conn);
return NULL;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment