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