bluez: gstavdtpsink: Fix D-Bus memory leak in audio
authorSyam Sidhardhan <s.syam@samsung.com>
Thu, 12 Apr 2012 15:02:55 +0000 (20:32 +0530)
committerTim-Philipp Müller <tim.muller@collabora.co.uk>
Wed, 9 Jan 2013 14:30:13 +0000 (14:30 +0000)
sys/bluez/gstavdtpsink.c

index e7e3820..d237979 100644 (file)
@@ -1329,6 +1329,8 @@ gst_avdtp_sink_transport_acquire (GstAvdtpSink * self)
   reply = dbus_connection_send_with_reply_and_block (self->data->conn,
       msg, -1, &err);
 
+  dbus_message_unref (msg);
+
   if (dbus_error_is_set (&err))
     goto fail;
 
@@ -1354,7 +1356,7 @@ fail:
   dbus_error_free (&err);
 
   if (reply)
-    dbus_message_unref (msg);
+    dbus_message_unref (reply);
 
   return FALSE;
 }