summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunkyeong Kim <jk0430.kim@samsung.com>2017-04-26 17:09:02 +0900
committerJunkyeong Kim <jk0430.kim@samsung.com>2017-04-26 17:09:07 +0900
commit3483d61b26bf4514ddeac04bf58af6438a95bb83 (patch)
treea28de6949aa0e0aa40d8329b0a2df71d853eb636
parent0e4ddb18581cec72286d2748434410106b0ecf0e (diff)
downloadlibtdm-drm-3483d61b26bf4514ddeac04bf58af6438a95bb83.tar.gz
libtdm-drm-3483d61b26bf4514ddeac04bf58af6438a95bb83.tar.bz2
libtdm-drm-3483d61b26bf4514ddeac04bf58af6438a95bb83.zip
free allocated memory if drmModePageFlip failed
Change-Id: I9d1acf08539da58d22f00f4e0692d54d75df9c0a Signed-off-by: Junkyeong Kim <jk0430.kim@samsung.com>
-rw-r--r--src/tdm_drm_display.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/tdm_drm_display.c b/src/tdm_drm_display.c
index 312de60..ec5867d 100644
--- a/src/tdm_drm_display.c
+++ b/src/tdm_drm_display.c
@@ -266,6 +266,7 @@ _tdm_drm_display_commit_primary_layer(tdm_drm_layer_data *layer_data,
if (drmModePageFlip(drm_data->drm_fd, output_data->crtc_id,
layer_data->display_buffer->fb_id, DRM_MODE_PAGE_FLIP_EVENT, event_data)) {
TDM_ERR("pageflip failed: %m");
+ free(event_data);
return TDM_ERROR_OPERATION_FAILED;
}
*do_waitvblank = 0;