Commit 70d60123 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>
(cherry picked from commit be82d4c1415c9490ecdccdd4bb2b61cd69499365)
parent 35169cb4
...@@ -297,10 +297,11 @@ FindFormat (vout_display_t *vd, ...@@ -297,10 +297,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_CreateGetBool (obj, "overlay")) if (!var_CreateGetBool (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