forked from enlightenment/efl
edge: fix memory leak and removed redundant return statement.
Summary: The name was freed after exit, so freeing it before and also freeing in a error case. There was a return statement after exit, thought it was redundant and removed. @fix Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com> Reviewers: devilhorns, cedric Reviewed By: cedric Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D1758 Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
This commit is contained in:
parent
e319e702a1
commit
3c55dccb25
|
@ -4322,6 +4322,7 @@ st_collections_group_parts_part_inherit(void)
|
|||
if (pc->parts[i] == current_part)
|
||||
{
|
||||
ERR("Cannot inherit from same part '%s' in group '%s'", name, current_de->entry);
|
||||
free(name);
|
||||
exit(-1);
|
||||
}
|
||||
pname = current_part->name;
|
||||
|
@ -4336,9 +4337,8 @@ st_collections_group_parts_part_inherit(void)
|
|||
}
|
||||
|
||||
ERR("Cannot inherit non-existing part '%s' in group '%s'", name, current_de->entry);
|
||||
exit(-1);
|
||||
|
||||
free(name);
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -9675,7 +9675,6 @@ st_collections_group_parts_part_description_map_color(void)
|
|||
{
|
||||
ERR("not enough memory");
|
||||
exit(-1);
|
||||
return;
|
||||
}
|
||||
|
||||
*color = tmp;
|
||||
|
|
Loading…
Reference in New Issue