From 8969f1e9835521d0efc67588730279532e4b567c Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Wed, 8 Oct 2008 08:52:53 +0200 Subject: Don't do double g_io_channel_unref if btd_request_authorization fails --- audio/avdtp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'audio/avdtp.c') diff --git a/audio/avdtp.c b/audio/avdtp.c index 23cdbb89..26e38b5d 100644 --- a/audio/avdtp.c +++ b/audio/avdtp.c @@ -2785,8 +2785,6 @@ static void avdtp_server_cb(GIOChannel *chan, int err, const bdaddr_t *src, session->io = g_io_add_watch(chan, G_IO_ERR | G_IO_HUP | G_IO_NVAL, (GIOFunc) session_cb, session); - g_io_channel_unref(chan); - err = btd_request_authorization(src, dst, ADVANCED_AUDIO_UUID, auth_cb, session); if (err < 0) { @@ -2794,6 +2792,8 @@ static void avdtp_server_cb(GIOChannel *chan, int err, const bdaddr_t *src, goto drop; } + g_io_channel_unref(chan); + return; drop: -- cgit