summaryrefslogtreecommitdiff
path: root/src/lib/ecore_drm
diff options
context:
space:
mode:
authorChris Michael <cpmichael@osg.samsung.com>2016-05-10 11:28:26 -0400
committerChris Michael <cpmichael@osg.samsung.com>2016-05-10 11:28:26 -0400
commitd40cd1dab21fec804f6c852a6b2dc94416907379 (patch)
tree6c919b593d1263b2814c1784771f74468d686f0d /src/lib/ecore_drm
parent2f722f3db3604e9f10a9a8e24934836a2f9eaf4b (diff)
ecore-drm: Fix potential segfault when setting output mode
If a NULL mode is passed into ecore_drm_output_mode_set, then we try to disable the given output. If disabling the output fails, we were trying to print an ERR message which tried to access the NULL mode. @fix Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
Diffstat (limited to 'src/lib/ecore_drm')
-rw-r--r--src/lib/ecore_drm/ecore_drm_output.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/lib/ecore_drm/ecore_drm_output.c b/src/lib/ecore_drm/ecore_drm_output.c
index d5bb43c..526e011 100644
--- a/src/lib/ecore_drm/ecore_drm_output.c
+++ b/src/lib/ecore_drm/ecore_drm_output.c
@@ -1503,8 +1503,7 @@ ecore_drm_output_mode_set(Ecore_Drm_Output *output, Ecore_Drm_Output_Mode *mode,
1503 if (drmModeSetCrtc(dev->drm.fd, output->crtc_id, 1503 if (drmModeSetCrtc(dev->drm.fd, output->crtc_id,
1504 0, 0, 0, 0, 0, NULL) < 0) 1504 0, 0, 0, 0, 0, NULL) < 0)
1505 { 1505 {
1506 ERR("Failed to set Mode %dx%d for Output %s: %m", 1506 ERR("Failed to turn off Output %s: %m", output->name);
1507 mode->width, mode->height, output->name);
1508 ret = EINA_FALSE; 1507 ret = EINA_FALSE;
1509 } 1508 }
1510 } 1509 }