Commit be82d4c1 authored by Can Wu's avatar Can Wu Committed by Rémi Denis-Courmont

vo/xcb: fix a memory leak in Open()

Signed-off-by: default avatarRémi Denis-Courmont <remi@remlab.net>
parent 956ce11e
...@@ -300,10 +300,11 @@ FindFormat (vout_display_t *vd, ...@@ -300,10 +300,11 @@ FindFormat (vout_display_t *vd,
static int Open (vlc_object_t *obj) static int Open (vlc_object_t *obj)
{ {
vout_display_t *vd = (vout_display_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")) if (!var_InheritBool (obj, "overlay"))
return VLC_EGENERIC; return VLC_EGENERIC;
p_sys = malloc (sizeof (*p_sys));
if (p_sys == NULL) if (p_sys == NULL)
return VLC_ENOMEM; return VLC_ENOMEM;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment