diff options
author | Ji-hoon Lee <dalton.lee@samsung.com> | 2018-03-30 16:34:01 +0900 |
---|---|---|
committer | Ji-hoon Lee <dalton.lee@samsung.com> | 2018-03-30 16:34:01 +0900 |
commit | 9a158bc212897bd3b636426b71b23d1e87d06517 (patch) | |
tree | d6ab1b961ebc87d6cb09de89a34badae4330f5ad /ism/extras | |
parent | e58de78992409e05d7f7496e8d8f10b65b4e2f9c (diff) | |
download | isf-9a158bc212897bd3b636426b71b23d1e87d06517.tar.gz isf-9a158bc212897bd3b636426b71b23d1e87d06517.tar.bz2 isf-9a158bc212897bd3b636426b71b23d1e87d06517.zip |
Fix defect detected by static anlaysis tool
Change-Id: I8dad8766004bf3276e47f8c093eb2a7d4a8ef6ce
Diffstat (limited to 'ism/extras')
-rw-r--r-- | ism/extras/wayland_immodule/wayland_imcontext.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ism/extras/wayland_immodule/wayland_imcontext.c b/ism/extras/wayland_immodule/wayland_imcontext.c index 43155ac3..edfe6b0b 100644 --- a/ism/extras/wayland_immodule/wayland_imcontext.c +++ b/ism/extras/wayland_immodule/wayland_imcontext.c @@ -891,12 +891,13 @@ rotary_event_cb(void *data EINA_UNUSED, int type EINA_UNUSED, void *event) isf_device_type_e type = find_device_type_from_ecore_event(ECORE_EVENT_DETENT_ROTATE); char *buffer = NULL; size_t buflen = 0; + if (device_buffer_encode((const char*)(event), sizeof(Ecore_Event_Detent_Rotate), &buffer, &buflen) && buffer && buflen > 0) { wl_text_input_process_input_device_event(imcontext->text_input, (unsigned int)type, buffer, buflen); - free(buffer); } + if (buffer) free(buffer); } return EINA_FALSE; |