aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/ecore_drm
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2015-11-04 12:44:29 -0500
committerChris Michael <cp.michael@samsung.com>2015-11-04 12:44:29 -0500
commitf77ba645d58d8a544c0723b3ebc8f8668d7cdd59 (patch)
treeed4982f2249e3b3421dbc9dd3b1328de3889069a /src/lib/ecore_drm
parentevas-gl-drm: Implement eglSetDamageRegionKHR (diff)
downloadefl-f77ba645d58d8a544c0723b3ebc8f8668d7cdd59.tar.gz
ecore-drm: Check return value of drmHandleEvent and cleanup
Summary: drmHandleEvent will return 0 on success, or -1 on error. We should trap for the error case so that we can cleanup any allocated callback structures. @fix Signed-off-by: Chris Michael <cp.michael@samsung.com>
Diffstat (limited to 'src/lib/ecore_drm')
-rw-r--r--src/lib/ecore_drm/ecore_drm_fb.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/lib/ecore_drm/ecore_drm_fb.c b/src/lib/ecore_drm/ecore_drm_fb.c
index 780516795b..68c7e94bb7 100644
--- a/src/lib/ecore_drm/ecore_drm_fb.c
+++ b/src/lib/ecore_drm/ecore_drm_fb.c
@@ -257,5 +257,15 @@ ecore_drm_fb_send(Ecore_Drm_Device *dev, Ecore_Drm_Fb *fb, Ecore_Drm_Pageflip_Cb
}
while (fb->pending_flip)
- drmHandleEvent(dev->drm.fd, &dev->drm_ctx);
+ {
+ int ret = 0;
+
+ ret = drmHandleEvent(dev->drm.fd, &dev->drm_ctx);
+ if (ret < 0)
+ {
+ ERR("drmHandleEvent Failed: %m");
+ free(cb);
+ break;
+ }
+ }
}