[PATCH RFC BlueZ] AVDTP: Fix closing invalid FD on error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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()).
---

NOTE:
gst_avdtp_sink_start() seems to be leaking "self" when it fails (even before
this patch). Can someone with better knowledge of audio/gstavdtpsink.c verify
this?


 audio/gstavdtpsink.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/audio/gstavdtpsink.c b/audio/gstavdtpsink.c
index dca9d67..c5392c5 100644
--- a/audio/gstavdtpsink.c
+++ b/audio/gstavdtpsink.c
@@ -1452,7 +1452,7 @@ static gboolean 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);
-- 
1.7.0.4

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux