summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Kovalenko <d.kovalenko@samsung.com>2017-08-15 11:38:29 +0300
committerDmitry Kovalenko <d.kovalenko@samsung.com>2017-08-15 14:55:24 +0300
commit5e641014ea1391c6353dfbf8d477c1153f27ad90 (patch)
tree37c849f1d4e1f7115d86a44f17a631f2f102ad1f
parent6c8edb75a69829d3ea7e2b4492e141580c205c1b (diff)
downloadswap-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
Change-Id: Ifc62e7746b0646d60537a76ba86a34df35a14aac Signed-off-by: Dmitry Kovalenko <d.kovalenko@samsung.com>
-rwxr-xr-xprobe_event/gesture.c4
-rw-r--r--probe_thread/libdathread.c5
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;