diff options
author | Dmitry Kovalenko <d.kovalenko@samsung.com> | 2017-08-15 11:38:29 +0300 |
---|---|---|
committer | Dmitry Kovalenko <d.kovalenko@samsung.com> | 2017-08-15 14:55:24 +0300 |
commit | 5e641014ea1391c6353dfbf8d477c1153f27ad90 (patch) | |
tree | 37c849f1d4e1f7115d86a44f17a631f2f102ad1f | |
parent | 6c8edb75a69829d3ea7e2b4492e141580c205c1b (diff) | |
download | swap-probe-accepted/tizen_3.0_wearable.tar.gz swap-probe-accepted/tizen_3.0_wearable.tar.bz2 swap-probe-accepted/tizen_3.0_wearable.zip |
Fix unhandled malloc errorssubmit/tizen_3.0/20170815.123042submit/tizen_3.0/20170815.122854submit/tizen_3.0/20170815.122716accepted/tizen/3.0/wearable/20170816.131014accepted/tizen/3.0/tv/20170816.131004accepted/tizen/3.0/mobile/20170816.130951accepted/tizen/3.0/common/20170816.145024tizen_3.0_210817accepted/tizen_3.0_wearableaccepted/tizen_3.0_tvaccepted/tizen_3.0_mobileaccepted/tizen_3.0_common
Change-Id: Ifc62e7746b0646d60537a76ba86a34df35a14aac
Signed-off-by: Dmitry Kovalenko <d.kovalenko@samsung.com>
-rwxr-xr-x | probe_event/gesture.c | 4 | ||||
-rw-r--r-- | probe_thread/libdathread.c | 5 |
2 files changed, 9 insertions, 0 deletions
diff --git a/probe_event/gesture.c b/probe_event/gesture.c index f941c84..fdb4ddd 100755 --- a/probe_event/gesture.c +++ b/probe_event/gesture.c @@ -237,6 +237,10 @@ void PROBE_NAME(elm_gesture_layer_cb_set)(Evas_Object *obj, Elm_Gesture_Type idx /* TODO Free memory on cb remove */ elm = malloc(sizeof(*elm)); + if (!elm) { + PRINTERR("Can't allocate memory for elm"); + return; + } elm->obj = obj; elm->idx = idx; diff --git a/probe_thread/libdathread.c b/probe_thread/libdathread.c index 62ac59f..c8c8b8e 100644 --- a/probe_thread/libdathread.c +++ b/probe_thread/libdathread.c @@ -81,6 +81,11 @@ HANDLER_WRAPPERS(thread_feature, int, pthread_create, pthread_t *, thread, { thread_routine_call *ptrc = (thread_routine_call *)malloc(sizeof(thread_routine_call)); + if (!ptrc) { + PRINTERR("Can't allocate memory for ptrc"); + return EAGAIN; + } + ptrc->thread_routine = start_routine; ptrc->argument = arg; |