teletextdec: fix some string leaks
authorTim-Philipp Müller <tim@centricular.com>
Thu, 7 Mar 2019 18:20:40 +0000 (18:20 +0000)
committerTim-Philipp Müller <tim@centricular.com>
Fri, 8 Mar 2019 01:18:39 +0000 (01:18 +0000)
ext/teletextdec/gstteletextdec.c

index c33999df7f2a3d779b9d815df06cf73b81e9055f..9e9f0634bca9a502b0e3d61f6dee41dab42c400e 100644 (file)
@@ -287,6 +287,8 @@ gst_teletextdec_finalize (GObject * object)
 
   g_mutex_clear (&teletext->queue_lock);
 
+  g_free (teletext->font_description);
+  g_free (teletext->subtitles_template);
   g_free (teletext->frame);
 
   G_OBJECT_CLASS (parent_class)->finalize (object);
@@ -359,9 +361,11 @@ gst_teletextdec_set_property (GObject * object, guint prop_id,
       teletext->subtitles_mode = g_value_get_boolean (value);
       break;
     case PROP_SUBS_TEMPLATE:
+      g_free (teletext->subtitles_template);
       teletext->subtitles_template = g_value_dup_string (value);
       break;
     case PROP_FONT_DESCRIPTION:
+      g_free (teletext->font_description);
       teletext->font_description = g_value_dup_string (value);
       break;
     default: