edc_editor, edc_parser: fixed resource leak.
This fixes coverity CID 47576, 47577, and 47578.
This commit is contained in:
parent
7571783f4a
commit
c687b539a7
|
@ -644,7 +644,11 @@ image_preview_show(edit_data *ed, char *cur, Evas_Coord x, Evas_Coord y)
|
||||||
ctxpopup_img_preview_create(ed, fullpath,
|
ctxpopup_img_preview_create(ed, fullpath,
|
||||||
ctxpopup_preview_dismiss_cb,
|
ctxpopup_preview_dismiss_cb,
|
||||||
ctxpopup_preview_relay_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_move(ctxpopup, x, y);
|
||||||
evas_object_show(ctxpopup);
|
evas_object_show(ctxpopup);
|
||||||
|
|
|
@ -728,10 +728,18 @@ parser_cur_group_name_get(parser_data *pd, Evas_Object *entry,
|
||||||
if (!td) return;
|
if (!td) return;
|
||||||
|
|
||||||
const char *text = elm_entry_entry_get(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);
|
char *utf8 = elm_entry_markup_to_utf8(text);
|
||||||
if (!utf8) return;
|
if (!utf8)
|
||||||
|
{
|
||||||
|
free(td);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
td->pd = pd;
|
td->pd = pd;
|
||||||
td->utf8 = utf8;
|
td->utf8 = utf8;
|
||||||
|
@ -756,10 +764,18 @@ parser_cur_name_get(parser_data *pd, Evas_Object *entry, void (*cb)(void *data,
|
||||||
if (!td) return;
|
if (!td) return;
|
||||||
|
|
||||||
const char *text = elm_entry_entry_get(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);
|
char *utf8 = elm_entry_markup_to_utf8(text);
|
||||||
if (!utf8) return;
|
if (!utf8)
|
||||||
|
{
|
||||||
|
free(td);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
td->pd = pd;
|
td->pd = pd;
|
||||||
td->utf8 = utf8;
|
td->utf8 = utf8;
|
||||||
|
|
Loading…
Reference in New Issue