summaryrefslogtreecommitdiff
path: root/gst-libs/gst
diff options
context:
space:
mode:
authorMiguel Angel Cabrera Moya <madmac2501@gmail.com>2012-11-02 20:09:21 +0100
committerTim-Philipp Müller <tim.muller@collabora.co.uk>2012-11-02 19:37:26 +0000
commit2d8edb1e865e1f2ab117fba6c1e5d9a09c810618 (patch)
tree19ce84e25e1a2f9b2fc6418c4b24ac3f682f58bf /gst-libs/gst
parent4b083d608ef9f2bbf3088f167d3751a7f29b5c9a (diff)
video-blend: fix memory leak when called with invalid parameters
https://bugzilla.gnome.org/show_bug.cgi?id=687472
Diffstat (limited to 'gst-libs/gst')
-rw-r--r--gst-libs/gst/video/video-blend.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gst-libs/gst/video/video-blend.c b/gst-libs/gst/video/video-blend.c
index 581618354..cd059a4c8 100644
--- a/gst-libs/gst/video/video-blend.c
+++ b/gst-libs/gst/video/video-blend.c
@@ -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);