summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Michael <cpmichael@osg.samsung.com>2016-03-10 12:13:44 -0500
committerChris Michael <cpmichael@osg.samsung.com>2016-03-10 12:13:44 -0500
commit07da0ba5d7f05ea71fcf7be7e9d0c7f5230b7cd4 (patch)
treeafaf36737bf5ba954e9674dbe8b320fd171a4568
parent3666d14980c1059ebb25d57756bc04abef27b7d7 (diff)
edje: Don't leak array source if we are going to exit function
This patch fixes a potential resource leak where we would previously create a new eina_array and then possibly return from this function (when checking validity of 's' parameter) without freeing the newly created array. Coverity CID1350291 @fix Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
-rw-r--r--src/bin/edje/edje_cc_out.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/bin/edje/edje_cc_out.c b/src/bin/edje/edje_cc_out.c
index 40b9ef641c..a900b40144 100644
--- a/src/bin/edje/edje_cc_out.c
+++ b/src/bin/edje/edje_cc_out.c
@@ -4217,10 +4217,10 @@ process_color_tree(char *s, const char *f_in, int ln)
4217 Eina_List *l; 4217 Eina_List *l;
4218 char *name; 4218 char *name;
4219 4219
4220 array = eina_array_new(4);
4221
4222 if (!s) return; 4220 if (!s) return;
4223 4221
4222 array = eina_array_new(4);
4223
4224 do 4224 do
4225 { 4225 {
4226 s = color_tree_token_next(token[id], s, &ln); 4226 s = color_tree_token_next(token[id], s, &ln);