modesetting: Fix GBM objects leak when checking for flip

GBM objects were never destroyed after looking for format and
modifier compatibility when deciding whether flipping or copying
a presented pixmap.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106106
Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
This commit is contained in:
Louis-Francis Ratté-Boulianne 2018-04-26 11:04:15 -04:00 committed by Adam Jackson
parent e00ada9fbb
commit 6cace4990a

View File

@ -263,6 +263,8 @@ ms_present_check_flip(RRCrtcPtr crtc,
format = gbm_bo_get_format(gbm);
modifier = gbm_bo_get_modifier(gbm);
gbm_bo_destroy(gbm);
if (!drmmode_is_format_supported(scrn, format, modifier)) {
if (reason)
*reason = PRESENT_FLIP_REASON_BUFFER_FORMAT;