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

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

parent 776fb1cb
......@@ -406,13 +406,15 @@ static picture_pool_t *Pool (vout_display_t *vd, unsigned requested_count)
break;
}
}
xcb_flush (sys->conn);
if (count == 0)
return NULL;
sys->pool = picture_pool_New (count, pic_array);
/* TODO release picture resources if NULL */
xcb_flush (sys->conn);
if (unlikely(sys->pool == NULL))
while (count > 0)
picture_Release(pic_array[--count]);
return sys->pool;
}
......
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