summaryrefslogtreecommitdiff
path: root/src/drmmode_display.c
diff options
context:
space:
mode:
authorMichel Dänzer <michel.daenzer@amd.com>2017-02-07 18:39:05 +0900
committerMichel Dänzer <michel@daenzer.net>2017-02-08 16:01:24 +0900
commit481394e3c9f9f7d88bb66fe9ae8834c87952a8ab (patch)
treeee687887ae60b0dd1cdacd776314b3066942a0f1 /src/drmmode_display.c
parent80fc78633962c1ec996b1721bfb757b98dc85bfc (diff)
Fix flip event data leak if calloc or drmModeAddFB fails
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 0fb0d770..9f787203 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -2904,8 +2904,10 @@ error:
radeon_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));