forked from enlightenment/enventor
edc_editor, edc_parser: fixed resource leak.
This fixes coverity CID 47576, 47577, and 47578.
This commit is contained in:
parent
09d2275ad1
commit
3a7c6caee6
|
@ -508,7 +508,11 @@ image_preview_show(edit_data *ed, char *cur, Evas_Coord x, Evas_Coord y)
|
|||
ctxpopup_img_preview_create(ed, fullpath,
|
||||
ctxpopup_preview_dismiss_cb,
|
||||
ctxpopup_preview_relay_cb);
|
||||
if (!ctxpopup) return EINA_FALSE;
|
||||
if (!ctxpopup)
|
||||
{
|
||||
free(filename);
|
||||
return EINA_FALSE;
|
||||
}
|
||||
|
||||
evas_object_move(ctxpopup, x, y);
|
||||
evas_object_show(ctxpopup);
|
||||
|
|
|
@ -753,10 +753,18 @@ parser_cur_group_name_get(parser_data *pd, Evas_Object *entry,
|
|||
}
|
||||
|
||||
const char *text = elm_entry_entry_get(entry);
|
||||
if (!text) return;
|
||||
if (!text)
|
||||
{
|
||||
free(td);
|
||||
return;
|
||||
}
|
||||
|
||||
char *utf8 = elm_entry_markup_to_utf8(text);
|
||||
if (!utf8) return;
|
||||
if (!utf8)
|
||||
{
|
||||
free(td);
|
||||
return;
|
||||
}
|
||||
|
||||
td->pd = pd;
|
||||
td->utf8 = utf8;
|
||||
|
@ -785,10 +793,18 @@ parser_cur_name_get(parser_data *pd, Evas_Object *entry, void (*cb)(void *data,
|
|||
}
|
||||
|
||||
const char *text = elm_entry_entry_get(entry);
|
||||
if (!text) return;
|
||||
if (!text)
|
||||
{
|
||||
free(td);
|
||||
return;
|
||||
}
|
||||
|
||||
char *utf8 = elm_entry_markup_to_utf8(text);
|
||||
if (!utf8) return;
|
||||
if (!utf8)
|
||||
{
|
||||
free(td);
|
||||
return;
|
||||
}
|
||||
|
||||
td->pd = pd;
|
||||
td->utf8 = utf8;
|
||||
|
|
Loading…
Reference in New Issue