test malloc/calloc's return. Fix CID1436182
This commit is contained in:
parent
7465f46a9f
commit
c2cd0035e4
|
@ -401,9 +401,12 @@ cb_term_new(Evas_Object *termio_obj)
|
||||||
|
|
||||||
length = (strlen(path) + strlen(cwd) + strlen(template) - 3);
|
length = (strlen(path) + strlen(cwd) + strlen(template) - 3);
|
||||||
cmd = malloc(sizeof(char) * length);
|
cmd = malloc(sizeof(char) * length);
|
||||||
snprintf(cmd, length, template, path, cwd);
|
if (cmd)
|
||||||
ecore_exe_run(cmd, NULL);
|
{
|
||||||
free(cmd);
|
snprintf(cmd, length, template, path, cwd);
|
||||||
|
ecore_exe_run(cmd, NULL);
|
||||||
|
free(cmd);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -303,10 +303,10 @@ _rec_read_directorys(Background_Ctx *ctx, Eina_List *list,
|
||||||
item = calloc(1, sizeof(Background_Item));
|
item = calloc(1, sizeof(Background_Item));
|
||||||
if (item)
|
if (item)
|
||||||
{
|
{
|
||||||
notify = calloc(1,
|
|
||||||
sizeof(Insert_Gen_Grid_Item_Notify));
|
|
||||||
item->path = eina_stringshare_add(path);
|
item->path = eina_stringshare_add(path);
|
||||||
list = eina_list_append(list, item);
|
list = eina_list_append(list, item);
|
||||||
|
notify = calloc(1,
|
||||||
|
sizeof(Insert_Gen_Grid_Item_Notify));
|
||||||
if (notify)
|
if (notify)
|
||||||
{
|
{
|
||||||
//insert item to gengrid
|
//insert item to gengrid
|
||||||
|
@ -350,6 +350,11 @@ _refresh_directory(Background_Ctx *ctx, const char* data)
|
||||||
item_class->func.content_get = _grid_content_get;
|
item_class->func.content_get = _grid_content_get;
|
||||||
|
|
||||||
item = calloc(1, sizeof(Background_Item));
|
item = calloc(1, sizeof(Background_Item));
|
||||||
|
if (!item)
|
||||||
|
{
|
||||||
|
elm_gengrid_item_class_free(item_class);
|
||||||
|
return;
|
||||||
|
}
|
||||||
ctx->background_list = eina_list_append(ctx->background_list, item);
|
ctx->background_list = eina_list_append(ctx->background_list, item);
|
||||||
|
|
||||||
//Insert None Item
|
//Insert None Item
|
||||||
|
|
Loading…
Reference in New Issue