obexd: Fix socket descriptor leak

This commit is contained in:
Johan Hedberg 2008-07-21 15:32:20 +03:00 committed by Marcel Holtmann
parent fbc604f565
commit 6c6c326f06

View File

@ -906,6 +906,7 @@ gint obex_session_start(gint fd, struct server *server)
g_io_add_watch_full(io, G_PRIORITY_DEFAULT,
G_IO_IN | G_IO_HUP | G_IO_ERR | G_IO_NVAL,
obex_handle_input, obex, obex_handle_destroy);
g_io_channel_set_close_on_unref(io, TRUE);
g_io_channel_unref(io);
return 0;