bluez: AVDTP: Fix closing invalid FD on error
authorAnderson Lizardo <anderson.lizardo@openbossa.org>
Thu, 17 Nov 2011 17:29:06 +0000 (13:29 -0400)
committerTim-Philipp Müller <tim.muller@collabora.co.uk>
Wed, 9 Jan 2013 14:30:13 +0000 (14:30 +0000)
In gst_avdtp_sink_start(), if bt_audio_service_open() failed, there was
an attempt to close an invalid file descriptor (through
bt_audio_service_close()).

sys/bluez/gstavdtpsink.c

index 27c4c25..e7e3820 100644 (file)
@@ -1444,7 +1444,7 @@ gst_avdtp_sink_start (GstBaseSink * basesink)
     err = -errno;
     GST_ERROR_OBJECT (self, "Cannot open connection to bt "
         "audio service: %s %d", strerror (-err), -err);
-    goto failed;
+    return FALSE;
   }
 
   self->server = g_io_channel_unix_new (sk);