Edje pick: Fixed lockwork suspected leaks.

The problem is that apparently size can be 0 but some data can still
be returned.
This commit is contained in:
Tom Hacohen 2013-02-18 11:59:15 +00:00
parent a7cd80338e
commit 326e2958d7
1 changed files with 14 additions and 0 deletions

View File

@ -713,6 +713,8 @@ _edje_pick_images_add(Edje_File *edf, Edje_File *o)
EINA_LOG_ERR("Image entry <%s> was not found in <%s> file.\n", buf , context.current_file->name);
status = EDJE_PICK_IMAGE_NOT_FOUND;
}
/* Should that really be freed? Or is some other handling needed? */
free(data);
}
}
@ -812,6 +814,8 @@ _edje_pick_sounds_add(Edje_File *edf)
EINA_LOG_ERR("Sample <%s> was not found in <%s> file.\n",
sample->name, context.current_file->name);
status = EDJE_PICK_SAMPLE_NOT_FOUND;
/* Should that really be freed? Or is some other handling needed? */
free(data);
}
}
@ -905,6 +909,11 @@ _edje_pick_scripts_add(Edje_File *edf, int id, int new_id)
buf, s->data, s->size));
context.current_file->scriptlist = eina_list_append(context.current_file->scriptlist, s);
}
else
{
/* Should that really be freed? Or is some other handling needed? */
free(data);
}
return EDJE_PICK_NO_ERROR;
}
@ -933,6 +942,11 @@ _edje_pick_lua_scripts_add(Edje_File *edf, int id, int new_id)
buf, s->data, s->size));
context.current_file->luascriptlist = eina_list_append(context.current_file->luascriptlist, s);
}
else
{
/* Should that really be freed? Or is some other handling needed? */
free(data);
}
return EDJE_PICK_NO_ERROR;
}