teletextdec: Fix buffer data leak
authorSebastian Dröge <sebastian.droege@collabora.co.uk>
Mon, 23 May 2011 13:14:04 +0000 (15:14 +0200)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Mon, 23 May 2011 13:20:37 +0000 (15:20 +0200)
ext/teletextdec/gstteletextdec.c

index 3d590ee..d7d5bff 100644 (file)
@@ -1054,9 +1054,8 @@ gst_teletextdec_push_preroll_buffer (GstTeletextDec * teletext)
     goto beach;
   }
 
-  buf = gst_buffer_new_and_alloc (1);
-  GST_BUFFER_DATA (buf) = GST_BUFFER_MALLOCDATA (buf) =
-      (guint8 *) g_strdup ("");
+  buf = gst_buffer_new ();
+  GST_BUFFER_DATA (buf)[0] = 0;
   gst_buffer_set_caps (buf, out_caps);
   ret = gst_pad_push (teletext->srcpad, buf);
   if (ret != GST_FLOW_OK)