diff options
author | Johan Hedberg <johan.hedberg@nokia.com> | 2008-10-08 08:52:53 +0200 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@nokia.com> | 2008-10-08 08:52:53 +0200 |
commit | 8969f1e9835521d0efc67588730279532e4b567c (patch) | |
tree | 36b3d1eff3af169d5b60b93b57545ab1f95dd26e /audio/avdtp.c | |
parent | b65d02ae48d96d1b2914ba203e404b695e596d84 (diff) |
Don't do double g_io_channel_unref if btd_request_authorization fails
Diffstat (limited to 'audio/avdtp.c')
-rw-r--r-- | audio/avdtp.c | 4 |
1 files changed, 2 insertions, 2 deletions
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: |