Fix: Don't leak memory

This commit is contained in:
Denis Kenzior 2010-02-01 17:59:04 -06:00
parent 321bb02ee3
commit 32e329e7d3
1 changed files with 2 additions and 5 deletions

View File

@ -157,13 +157,10 @@ static gboolean on_socket_connected(GIOChannel *chan, GIOCondition cond,
client_io = g_io_channel_unix_new(fd);
server = g_at_server_new(client_io);
g_io_channel_unref(client_io);
if (!server) {
g_io_channel_shutdown(client_io, FALSE, NULL);
g_io_channel_unref(client_io);
if (!server)
goto error;
}
add_handler(server);