diff options
author | Stefan Kost <ensonic@users.sf.net> | 2009-02-04 16:17:34 +0200 |
---|---|---|
committer | Stefan Kost <ensonic@users.sf.net> | 2009-02-04 16:17:34 +0200 |
commit | 9cda224a0d8b32ca20fc6e7eb39f260b1246e1af (patch) | |
tree | 011b3bc50d1c78023e49d6361d0f03112ec47142 /gst/gstregistrybinary.c | |
parent | f207841b89f2dd71657b649409b307fa7ee9d348 (diff) |
leak: Don't leak type name in failure cases.
Diffstat (limited to 'gst/gstregistrybinary.c')
-rw-r--r-- | gst/gstregistrybinary.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gst/gstregistrybinary.c b/gst/gstregistrybinary.c index 5f68b8559..fe3119f9c 100644 --- a/gst/gstregistrybinary.c +++ b/gst/gstregistrybinary.c @@ -866,7 +866,7 @@ gst_registry_binary_load_feature (GstRegistry * registry, gchar ** in, /* unpack plugin feature strings */ unpack_string (*in, type_name); - if (!type_name || !*(type_name)) { + if (!type_name) { GST_ERROR ("No feature type name"); return FALSE; } @@ -876,10 +876,12 @@ gst_registry_binary_load_feature (GstRegistry * registry, gchar ** in, if (!(type = g_type_from_name (type_name))) { GST_ERROR ("Unknown type from typename '%s' for plugin '%s'", type_name, plugin_name); + g_free (type_name); return FALSE; } if ((feature = g_object_new (type, NULL)) == NULL) { GST_ERROR ("Can't create feature from type"); + g_free (type_name); return FALSE; } |