summaryrefslogtreecommitdiff
path: root/src/drmmode_display.c
diff options
context:
space:
mode:
authorMichel Dänzer <michel.daenzer@amd.com>2017-03-02 17:08:19 +0900
committerMichel Dänzer <michel@daenzer.net>2017-03-03 16:10:07 +0900
commit53926db2355de0a324c205703a0377b498136f65 (patch)
tree896f72f14cf31fd4a1ba54bbaf58940c80155753 /src/drmmode_display.c
parent45a8ec6257c370eecf43b6b8010863e37b704872 (diff)
Fix flip event data leak if calloc or drmModeAddFB fails
(Ported from radeon commit 481394e3c9f9f7d88bb66fe9ae8834c87952a8ab) Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'src/drmmode_display.c')
-rw-r--r--src/drmmode_display.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index 67dd61b..bc7b9c3 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -2688,8 +2688,10 @@ error:
amdgpu_drm_abort_entry(drm_queue_seq);
else if (crtc)
drmmode_flip_abort(crtc, flipdata);
- else if (flipdata && flipdata->flip_count <= 1)
+ else {
+ abort(NULL, data);
free(flipdata);
+ }
xf86DrvMsg(scrn->scrnIndex, X_WARNING, "Page flip failed: %s\n",
strerror(errno));