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:
GST_INFO ("Reading plugin feature failed");
g_free (type_name);
if (feature) {
if (GST_IS_OBJECT (feature))
gst_object_unref (feature);
else
g_object_unref (feature);
}
return FALSE;
}