summaryrefslogtreecommitdiff
path: root/src/lib/ecore_drm
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2019-08-05 13:44:25 +0100
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2019-08-05 13:44:25 +0100
commit034ef0badc593656af968797ee494c23809f2ae1 (patch)
tree1605796ecc7c215376e6b0ff8aa7c75e12795a13 /src/lib/ecore_drm
parentea48df482c85ac7958bfc0c0d953d90cf4292544 (diff)
ecore drm - legacy - fix coverity leak complaint
is real - in error case. fix it to make coverity happy. fix CID 1402696
Diffstat (limited to 'src/lib/ecore_drm')
-rw-r--r--src/lib/ecore_drm/ecore_drm_evdev.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/ecore_drm/ecore_drm_evdev.c b/src/lib/ecore_drm/ecore_drm_evdev.c
index 3cc1f74..4fa66bc0 100644
--- a/src/lib/ecore_drm/ecore_drm_evdev.c
+++ b/src/lib/ecore_drm/ecore_drm_evdev.c
@@ -367,7 +367,7 @@ _device_handle_key(struct libinput_device *device, struct libinput_event_keyboar
367 367
368 e = calloc(1, sizeof(Ecore_Event_Key) + strlen(key) + strlen(keyname) + 368 e = calloc(1, sizeof(Ecore_Event_Key) + strlen(key) + strlen(keyname) +
369 ((compose[0] != '\0') ? strlen(compose) : 0) + 3); 369 ((compose[0] != '\0') ? strlen(compose) : 0) + 3);
370 if (!e) return; 370 if (!e) goto err;
371 371
372 e->keyname = (char *)(e + 1); 372 e->keyname = (char *)(e + 1);
373 e->key = e->keyname + strlen(keyname) + 1; 373 e->key = e->keyname + strlen(keyname) + 1;
@@ -394,6 +394,7 @@ _device_handle_key(struct libinput_device *device, struct libinput_event_keyboar
394 else 394 else
395 ecore_event_add(ECORE_EVENT_KEY_UP, e, NULL, NULL); 395 ecore_event_add(ECORE_EVENT_KEY_UP, e, NULL, NULL);
396 396
397err:
397 if (tmp) free(tmp); 398 if (tmp) free(tmp);
398} 399}
399 400