[0.11] gstreamer: check: Don't leak the feature name

Edward Hervey bilboed at kemper.freedesktop.org
Mon Oct 17 00:53:58 PDT 2011


Module: gstreamer
Branch: 0.11
Commit: b03b4c47afe4120a33c6cf4cb371f28686360bac
URL:    http://cgit.freedesktop.org/gstreamer/gstreamer/commit/?id=b03b4c47afe4120a33c6cf4cb371f28686360bac

Author: Edward Hervey <edward.hervey at collabora.co.uk>
Date:   Mon Oct 17 09:27:49 2011 +0200

check: Don't leak the feature name

---

 tests/check/gst/gstregistry.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/tests/check/gst/gstregistry.c b/tests/check/gst/gstregistry.c
index 91190cc..6d13cce 100644
--- a/tests/check/gst/gstregistry.c
+++ b/tests/check/gst/gstregistry.c
@@ -55,11 +55,13 @@ print_plugin (const gchar * marker, GstRegistry * registry, GstPlugin * plugin)
   features = gst_registry_get_feature_list_by_plugin (registry, name);
   for (f = features; f != NULL; f = f->next) {
     GstPluginFeature *feature;
+    gchar *featurename;
 
     feature = GST_PLUGIN_FEATURE (f->data);
 
-    GST_LOG ("%s:    feature: %p %s", marker, feature,
-        gst_plugin_feature_get_name (feature));
+    featurename = gst_plugin_feature_get_name (feature);
+    GST_LOG ("%s:    feature: %p %s", marker, feature, featurename);
+    g_free (featurename);
   }
   gst_plugin_feature_list_free (features);
 }



More information about the gstreamer-commits mailing list