summaryrefslogtreecommitdiff
path: root/src/bin/edje
diff options
context:
space:
mode:
authorSrivardhan Hebbar <sri.hebbar@samsung.com>2014-12-10 11:19:59 +0100
committerCedric BAIL <cedric@osg.samsung.com>2014-12-10 11:20:06 +0100
commit3c55dccb25c7fab256dc5f7b4e309c298ddc80ae (patch)
tree3f4eb9311c3f185fe834f22eecaa8b4872cc5778 /src/bin/edje
parente319e702a1262ab5a78eda2bb3eadcb8a2061ca5 (diff)
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>
Diffstat (limited to 'src/bin/edje')
-rw-r--r--src/bin/edje/edje_cc_handlers.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/bin/edje/edje_cc_handlers.c b/src/bin/edje/edje_cc_handlers.c
index 31297ac22c..7cc08a0882 100644
--- a/src/bin/edje/edje_cc_handlers.c
+++ b/src/bin/edje/edje_cc_handlers.c
@@ -4322,6 +4322,7 @@ st_collections_group_parts_part_inherit(void)
4322 if (pc->parts[i] == current_part) 4322 if (pc->parts[i] == current_part)
4323 { 4323 {
4324 ERR("Cannot inherit from same part '%s' in group '%s'", name, current_de->entry); 4324 ERR("Cannot inherit from same part '%s' in group '%s'", name, current_de->entry);
4325 free(name);
4325 exit(-1); 4326 exit(-1);
4326 } 4327 }
4327 pname = current_part->name; 4328 pname = current_part->name;
@@ -4336,9 +4337,8 @@ st_collections_group_parts_part_inherit(void)
4336 } 4337 }
4337 4338
4338 ERR("Cannot inherit non-existing part '%s' in group '%s'", name, current_de->entry); 4339 ERR("Cannot inherit non-existing part '%s' in group '%s'", name, current_de->entry);
4339 exit(-1);
4340
4341 free(name); 4340 free(name);
4341 exit(-1);
4342} 4342}
4343 4343
4344static void 4344static void
@@ -9675,7 +9675,6 @@ st_collections_group_parts_part_description_map_color(void)
9675 { 9675 {
9676 ERR("not enough memory"); 9676 ERR("not enough memory");
9677 exit(-1); 9677 exit(-1);
9678 return;
9679 } 9678 }
9680 9679
9681 *color = tmp; 9680 *color = tmp;