pluginfeature: Fix object leak
authorSeungha Yang <seungha@centricular.com>
Thu, 13 Jan 2022 19:45:08 +0000 (04:45 +0900)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Thu, 13 Jan 2022 23:19:39 +0000 (23:19 +0000)
Need to release GstPluginFeature object after use

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1521>

subprojects/gstreamer/gst/gstpluginfeature.c

index ac61cc0e11289fee6d0db28daaee30add9d1599e..bdcabb473457422d559266681ca9ba04b2da540d 100644 (file)
@@ -491,6 +491,7 @@ _priv_gst_plugin_feature_rank_initialize (void)
           if (feature) {
             gst_plugin_feature_set_rank (feature, rank);
             GST_DEBUG ("Update rank of plugin feature \"%s\" to %d", str, rank);
+            gst_object_unref (feature);
           }
         }
       }