[vlc-devel] vo/xcb: fix a memory leak in Open()
Can Wu
wu.canus at gmail.com
Mon Jul 18 12:57:24 CEST 2011
---
modules/video_output/xcb/xvideo.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/modules/video_output/xcb/xvideo.c b/modules/video_output/xcb/xvideo.c
index b7e0339..24d2345 100644
--- a/modules/video_output/xcb/xvideo.c
+++ b/modules/video_output/xcb/xvideo.c
@@ -300,10 +300,11 @@ FindFormat (vout_display_t *vd,
static int Open (vlc_object_t *obj)
{
vout_display_t *vd = (vout_display_t *)obj;
- vout_display_sys_t *p_sys = malloc (sizeof (*p_sys));
+ vout_display_sys_t *p_sys;
if (!var_InheritBool (obj, "overlay"))
return VLC_EGENERIC;
+ p_sys = malloc (sizeof (*p_sys));
if (p_sys == NULL)
return VLC_ENOMEM;
--
1.7.3.2.168.gd6b63
More information about the vlc-devel
mailing list