video-blend: fix memory leak when called with invalid parameters

https://bugzilla.gnome.org/show_bug.cgi?id=687472
This commit is contained in:
Miguel Angel Cabrera Moya 2012-11-02 20:09:21 +01:00 committed by Tim-Philipp Müller
parent 4b083d608e
commit 2d8edb1e86

View file

@ -164,11 +164,13 @@ gst_video_blend_scale_linear_RGBA (GstVideoInfo * src, GstBuffer * src_buffer,
guint dest_stride;
guint src_stride;
guint8 *dest_pixels;
guint8 *tmpbuf = g_malloc (dest_width * 8 * 4);
guint8 *tmpbuf;
GstVideoFrame src_frame, dest_frame;
g_return_if_fail (dest_buffer != NULL);
tmpbuf = g_malloc (dest_width * 8 * 4);
gst_video_info_init (dest);
gst_video_info_set_format (dest, GST_VIDEO_INFO_FORMAT (src),
dest_width, dest_height);