diff options
author | Michel Dänzer <michel.daenzer@amd.com> | 2017-02-07 18:39:05 +0900 |
---|---|---|
committer | Michel Dänzer <michel@daenzer.net> | 2017-02-08 16:01:24 +0900 |
commit | 481394e3c9f9f7d88bb66fe9ae8834c87952a8ab (patch) | |
tree | ee687887ae60b0dd1cdacd776314b3066942a0f1 /src/drmmode_display.c | |
parent | 80fc78633962c1ec996b1721bfb757b98dc85bfc (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.c | 4 |
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)); |