Commit c9064d52 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

XCB: memory leak

parent 15dfd57a
...@@ -159,12 +159,16 @@ static int Open (vlc_object_t *obj) ...@@ -159,12 +159,16 @@ static int Open (vlc_object_t *obj)
/* Connect to X */ /* Connect to X */
p_sys->conn = Connect (obj); p_sys->conn = Connect (obj);
if (p_sys->conn == NULL) if (p_sys->conn == NULL)
{
free (p_sys);
return VLC_EGENERIC; return VLC_EGENERIC;
}
if (!CheckXVideo (vout, p_sys->conn)) if (!CheckXVideo (vout, p_sys->conn))
{ {
msg_Warn (vout, "Please enable XVideo 2.2 for faster video display"); msg_Warn (vout, "Please enable XVideo 2.2 for faster video display");
xcb_disconnect (p_sys->conn); xcb_disconnect (p_sys->conn);
free (p_sys);
return VLC_EGENERIC; return VLC_EGENERIC;
} }
...@@ -173,6 +177,7 @@ static int Open (vlc_object_t *obj) ...@@ -173,6 +177,7 @@ static int Open (vlc_object_t *obj)
if (p_sys->embed == NULL) if (p_sys->embed == NULL)
{ {
xcb_disconnect (p_sys->conn); xcb_disconnect (p_sys->conn);
free (p_sys);
return VLC_EGENERIC; return VLC_EGENERIC;
} }
......
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