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

XCB/XVideo: fix long-standing massive leak on error

parent 30dbe16a
......@@ -657,13 +657,15 @@ static void PoolAlloc (vout_display_t *vd, unsigned requested_count)
if (unlikely(pic_array[count] == NULL))
break;
}
xcb_flush (p_sys->conn);
if (count == 0)
return;
p_sys->pool = picture_pool_New (count, pic_array);
/* TODO release picture resources if NULL */
xcb_flush (p_sys->conn);
if (unlikely(p_sys->pool == NULL))
while (count > 0)
picture_Release(pic_array[--count]);
}
/**
......
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