[PATCH xserver 4/4] modesetting: Don't leak gbm_bo's in ms_present_check_flip().

Mario Kleiner mario.kleiner.de at gmail.com
Mon Apr 30 07:06:10 UTC 2018


Signed-off-by: Mario Kleiner <mario.kleiner.de at gmail.com>
Cc: Daniel Stone <daniels at collabora.com>
Cc: Adam Jackson <ajax at redhat.com>
---
 hw/xfree86/drivers/modesetting/present.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/hw/xfree86/drivers/modesetting/present.c b/hw/xfree86/drivers/modesetting/present.c
index 9be8efe..d4325e5 100644
--- a/hw/xfree86/drivers/modesetting/present.c
+++ b/hw/xfree86/drivers/modesetting/present.c
@@ -263,6 +263,7 @@ 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;
-- 
2.7.4



More information about the xorg-devel mailing list