From 0b9cf7e47d9b57f463fa081babf83227ed0780c9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sebastian=20Dr=C3=B6ge?= Date: Thu, 14 Apr 2011 13:37:52 +0200 Subject: [PATCH] v4l2radio: Free videodev string before replacing it --- sys/v4l2/gstv4l2radio.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/v4l2/gstv4l2radio.c b/sys/v4l2/gstv4l2radio.c index b1699d381..63a2fed17 100644 --- a/sys/v4l2/gstv4l2radio.c +++ b/sys/v4l2/gstv4l2radio.c @@ -384,6 +384,7 @@ gst_v4l2radio_init (GstV4l2Radio * filter, GstV4l2RadioClass * gclass) gst_v4l2radio_get_input, gst_v4l2radio_set_input, NULL); filter->v4l2object->frequency = DEFAULT_FREQUENCY; + g_free (filter->v4l2object->videodev); filter->v4l2object->videodev = g_strdup (DEFAULT_PROP_DEVICE); } @@ -521,6 +522,7 @@ gst_v4l2radio_set_property (GObject * object, guint prop_id, gint frequency; switch (prop_id) { case ARG_DEVICE: + g_free (radio->v4l2object->videodev); radio->v4l2object->videodev = g_strdup ((gchar *) g_value_get_string (value)); break; -- 2.34.1