Change-Id: Ifc62e7746b0646d60537a76ba86a34df35a14aac
Signed-off-by: Dmitry Kovalenko <d.kovalenko@samsung.com>
/* 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;
{
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;