ladspa: don't reference freed pointer when building portnames

This commit is contained in:
Stefan Kost 2009-10-15 15:59:23 +03:00
parent 277699bd2a
commit c4190684c5

View file

@ -314,14 +314,17 @@ gst_ladspa_class_get_param_name (GstLADSPAClass * klass, gint portnum)
gint n = 1;
gchar *nret = g_strdup_printf ("%s-%d", ret, n++);
g_free (ret);
while (g_object_class_find_property (G_OBJECT_CLASS (klass), nret)) {
g_free (nret);
nret = g_strdup_printf ("%s-%d", ret, n++);
}
g_free (ret);
ret = nret;
}
GST_DEBUG ("built property name '%s' from port name '%s'", ret,
desc->PortNames[portnum]);
return ret;
}