diff options
author | Louis-Francis Ratté-Boulianne <lfrb@collabora.com> | 2018-04-26 11:04:15 -0400 |
---|---|---|
committer | Adam Jackson <ajax@redhat.com> | 2018-04-30 14:01:02 -0400 |
commit | 6cace4990abc2386b6ea68536b321994d264c295 (patch) | |
tree | 7fcfe536565404ce4efcdd892abbac0a042baaf3 | |
parent | e00ada9fbbddf4570fe38c3ceeb922af7afcfd1a (diff) |
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>
-rw-r--r-- | hw/xfree86/drivers/modesetting/present.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/hw/xfree86/drivers/modesetting/present.c b/hw/xfree86/drivers/modesetting/present.c index 9be8efe4f..dda7cc064 100644 --- a/hw/xfree86/drivers/modesetting/present.c +++ b/hw/xfree86/drivers/modesetting/present.c @@ -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; |