forked from enlightenment/efl
edje cc mo encoding leak - ensure data is freed when setting up encoding
this should fix CID 1306604
This commit is contained in:
parent
33880a3d7c
commit
b1d9cf8d8d
|
@ -1656,7 +1656,7 @@ data_write_mo(Eet_File *ef, int *mo_num)
|
|||
|
||||
for (i = 0; i < (int)edje_file->mo_dir->mo_entries_count; i++)
|
||||
{
|
||||
Mo_Write *mw;
|
||||
Mo_Write *mw, *mw2;
|
||||
mw = calloc(1, sizeof(Mo_Write));
|
||||
if (!mw) continue;
|
||||
mw->ef = ef;
|
||||
|
@ -1677,14 +1677,20 @@ data_write_mo(Eet_File *ef, int *mo_num)
|
|||
if (ecore_file_exists(po_path))
|
||||
{
|
||||
snprintf(buf, sizeof(buf), "msgfmt -o %s %s", mo_path, po_path);
|
||||
mw->mo_path = strdup(mo_path);
|
||||
mw->exe = ecore_exe_run(buf, mw);
|
||||
ecore_event_handler_add(ECORE_EXE_EVENT_DEL,
|
||||
_exe_del_cb, mw);
|
||||
mw2 = malloc(sizeof(Mo_Write));
|
||||
if (mw2)
|
||||
{
|
||||
memcpy(mw2, mw, sizeof(Mo_Write));
|
||||
mw2->mo_path = strdup(mo_path);
|
||||
mw2->exe = ecore_exe_run(buf, mw2);
|
||||
ecore_event_handler_add(ECORE_EXE_EVENT_DEL,
|
||||
_exe_del_cb, mw2);
|
||||
}
|
||||
}
|
||||
else
|
||||
error_and_abort(mw->ef, "Invalid .po file.");
|
||||
}
|
||||
free(mw);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue