From a3c47a0754bfaaa4ebec94d4ea9e397c923b1cba Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Wed, 13 Jul 2016 15:45:33 +0200 Subject: tools: fix device leaks in gst-device-monitor gst_message_parse_device_{added,removed} is actually returning a new ref on the device. https://bugzilla.gnome.org/show_bug.cgi?id=768776 --- tools/gst-device-monitor.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tools') diff --git a/tools/gst-device-monitor.c b/tools/gst-device-monitor.c index c0a8ec167..43a127f18 100644 --- a/tools/gst-device-monitor.c +++ b/tools/gst-device-monitor.c @@ -128,10 +128,12 @@ bus_msg_handler (GstBus * bus, GstMessage * msg, gpointer user_data) case GST_MESSAGE_DEVICE_ADDED: gst_message_parse_device_added (msg, &device); device_added (device); + gst_object_unref (device); break; case GST_MESSAGE_DEVICE_REMOVED: gst_message_parse_device_removed (msg, &device); device_removed (device); + gst_object_unref (device); break; default: g_print ("%s message\n", GST_MESSAGE_TYPE_NAME (msg)); -- cgit v1.2.1