aboutsummaryrefslogtreecommitdiffstats
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
parentbuild coverage: make coverage numbers more accurate by using a baseline (diff)
downloadefl-07da0ba5d7f05ea71fcf7be7e9d0c7f5230b7cd4.tar.gz
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)
Eina_List *l;
char *name;
- array = eina_array_new(4);
-
if (!s) return;
+ array = eina_array_new(4);
+
do
{
s = color_tree_token_next(token[id], s, &ln);