binaryregistry: don't unref NULL if we have an early read error

This commit is contained in:
Stefan Kost 2009-07-20 11:04:05 +03:00
parent 1d0c6a669f
commit de1e991dec

View file

@ -1045,10 +1045,12 @@ gst_registry_binary_load_feature (GstRegistry * registry, gchar ** in,
fail: fail:
GST_INFO ("Reading plugin feature failed"); GST_INFO ("Reading plugin feature failed");
g_free (type_name); g_free (type_name);
if (GST_IS_OBJECT (feature)) if (feature) {
gst_object_unref (feature); if (GST_IS_OBJECT (feature))
else gst_object_unref (feature);
g_object_unref (feature); else
g_object_unref (feature);
}
return FALSE; return FALSE;
} }