diff --git a/gst/gstdevicemonitor.c b/gst/gstdevicemonitor.c index a9eda0ab91..4e6ecb326a 100644 --- a/gst/gstdevicemonitor.c +++ b/gst/gstdevicemonitor.c @@ -695,12 +695,9 @@ gst_device_monitor_add_filter (GstDeviceMonitor * monitor, /* Ensure there is no leak here */ g_assert (factories == NULL); - if (matched) { + if (matched) id = filter->id; - g_ptr_array_add (monitor->priv->filters, filter); - } else { - device_filter_free (filter); - } + g_ptr_array_add (monitor->priv->filters, filter); GST_OBJECT_UNLOCK (monitor);