diff --git a/src/bin/keyin.c b/src/bin/keyin.c index 5691c01c..0b6c0cbf 100644 --- a/src/bin/keyin.c +++ b/src/bin/keyin.c @@ -401,9 +401,12 @@ cb_term_new(Evas_Object *termio_obj) length = (strlen(path) + strlen(cwd) + strlen(template) - 3); cmd = malloc(sizeof(char) * length); - snprintf(cmd, length, template, path, cwd); - ecore_exe_run(cmd, NULL); - free(cmd); + if (cmd) + { + snprintf(cmd, length, template, path, cwd); + ecore_exe_run(cmd, NULL); + free(cmd); + } } else { diff --git a/src/bin/options_background.c b/src/bin/options_background.c index b0dfae2f..9deaa81c 100644 --- a/src/bin/options_background.c +++ b/src/bin/options_background.c @@ -303,10 +303,10 @@ _rec_read_directorys(Background_Ctx *ctx, Eina_List *list, item = calloc(1, sizeof(Background_Item)); if (item) { - notify = calloc(1, - sizeof(Insert_Gen_Grid_Item_Notify)); item->path = eina_stringshare_add(path); list = eina_list_append(list, item); + notify = calloc(1, + sizeof(Insert_Gen_Grid_Item_Notify)); if (notify) { //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 = 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); //Insert None Item