Change-Id: I87aec1626f405502215e6c80923bce856963c834
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
static loader_info_t *__create_loader_info()
{
- loader_info_t *info = malloc(sizeof(loader_info_t));
+ loader_info_t *info;
- if (!info)
+ info = malloc(sizeof(loader_info_t));
+ if (info == NULL) {
+ _E("Out of memory");
return NULL;
+ }
info->type = 0;
info->name = NULL;
list = g_list_append(list, cur_info);
}
cur_info = __create_loader_info();
+ if (!cur_info)
+ break;
continue;
}