kmssink: Free devname before setting it

This avoids leaking the devname if the property is set twice.
This commit is contained in:
Nicolas Dufresne 2017-08-09 14:59:19 -04:00
parent d949de49f3
commit b7b7948e5f

View file

@ -1433,6 +1433,7 @@ gst_kms_sink_set_property (GObject * object, guint prop_id,
switch (prop_id) {
case PROP_DRIVER_NAME:
g_free (sink->devname);
sink->devname = g_value_dup_string (value);
break;
case PROP_CONNECTOR_ID: