diff options
author | JengHyun Kang <jhyuni.kang@samsung.com> | 2017-08-01 21:02:08 +0900 |
---|---|---|
committer | JengHyun Kang <jhyuni.kang@samsung.com> | 2017-08-01 21:02:08 +0900 |
commit | e8b33160bb4cbf13fc0cc4fcc9feafaa5eaeca94 (patch) | |
tree | ca4f91e76392663caffea84dd0b230875597964c | |
parent | ba78d61f2a5850932ab47a7fed8493ebbf1e195e (diff) | |
download | e-mod-tizen-keyrouter-accepted/tizen_3.0_ivi.tar.gz e-mod-tizen-keyrouter-accepted/tizen_3.0_ivi.tar.bz2 e-mod-tizen-keyrouter-accepted/tizen_3.0_ivi.zip |
fix svace issuessubmit/tizen_3.0/20170802.102112accepted/tizen/3.0/wearable/20170803.075644accepted/tizen/3.0/tv/20170803.075619accepted/tizen/3.0/mobile/20170803.075631accepted/tizen/3.0/ivi/20170803.075656accepted/tizen/3.0/common/20170803.140841accepted/tizen_3.0_ivi
Change-Id: Ia18a9d6c6b8a6e19f3998c9344744c0b75409bcf
-rw-r--r-- | src/e_mod_keyrouter_events.c | 1 | ||||
-rw-r--r-- | src/e_mod_keyrouter_list.c | 30 | ||||
-rw-r--r-- | src/e_mod_main_wl.c | 1 |
3 files changed, 22 insertions, 10 deletions
diff --git a/src/e_mod_keyrouter_events.c b/src/e_mod_keyrouter_events.c index 2a6ed84..77b669a 100644 --- a/src/e_mod_keyrouter_events.c +++ b/src/e_mod_keyrouter_events.c @@ -40,6 +40,7 @@ _e_keyrouter_event_generate_key(Ecore_Event_Key *ev, int type, struct wl_client len = sizeof(Ecore_Event_Key) + strlen(ev->key) + strlen(ev->keyname) + ((ev->compose) ? strlen(ev->compose) : 0) + 3; ev_cpy = calloc(1, len); + if (!ev_cpy) return; memcpy(ev_cpy, ev, len); ev_cpy->data = send_surface; diff --git a/src/e_mod_keyrouter_list.c b/src/e_mod_keyrouter_list.c index 81c8cf1..0e97f4d 100644 --- a/src/e_mod_keyrouter_list.c +++ b/src/e_mod_keyrouter_list.c @@ -524,13 +524,16 @@ _e_keyrouter_build_register_list(void) if (!krt->HardKeys[*ddata].registered_ptr) { node = E_NEW(E_Keyrouter_Key_List_Node, 1); - node->surface = surface; - node->wc = NULL; - node->focused = EINA_FALSE; - node->status = E_KRT_CSTAT_ALIVE; - krt->HardKeys[*ddata].registered_ptr = node; - - KLDBG("%d key's register wl_surface is %p", *ddata, surface); + if (node) + { + node->surface = surface; + node->wc = NULL; + node->focused = EINA_FALSE; + node->status = E_KRT_CSTAT_ALIVE; + krt->HardKeys[*ddata].registered_ptr = node; + + KLDBG("%d key's register wl_surface is %p", *ddata, surface); + } } } @@ -647,8 +650,11 @@ _e_keyrouter_add_registered_surface_in_list(struct wl_resource *surface, int key if (EINA_TRUE == key_finded) break; key_added = E_NEW(int, 1); - *key_added = key; - rwin_info->keys = eina_list_append(rwin_info->keys, key_added); + if (key_added) + { + *key_added = key; + rwin_info->keys = eina_list_append(rwin_info->keys, key_added); + } surface_finded = EINA_TRUE; KLDBG("Registered Key(%d) is added to wl_surface (%p)", key, surface); @@ -659,8 +665,14 @@ _e_keyrouter_add_registered_surface_in_list(struct wl_resource *surface, int key if (EINA_FALSE == surface_finded) { rwin_added = E_NEW(E_Keyrouter_Registered_Window_Info, 1); + if (!rwin_added) return; rwin_added->surface = surface; key_added = E_NEW(int, 1); + if (!key_added) + { + free(rwin_added); + return; + } *key_added = key; rwin_added->keys = eina_list_append(rwin_added->keys, key_added); krt->registered_window_list = eina_list_append(krt->registered_window_list, rwin_added); diff --git a/src/e_mod_main_wl.c b/src/e_mod_main_wl.c index bfefbd2..990dfaf 100644 --- a/src/e_mod_main_wl.c +++ b/src/e_mod_main_wl.c @@ -1009,7 +1009,6 @@ _e_keyrouter_keygrab_print(void *data, const char *log_path) fprintf(log_fl, " -- Client Information --\n"); fprintf(log_fl, " = connected fd: %d\n", wl_client_get_fd(kdata->wc)); } - break; } } |