devilhorns pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=07da0ba5d7f05ea71fcf7be7e9d0c7f5230b7cd4

commit 07da0ba5d7f05ea71fcf7be7e9d0c7f5230b7cd4
Author: Chris Michael <cpmich...@osg.samsung.com>
Date:   Thu Mar 10 12:13:44 2016 -0500

    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 <cpmich...@osg.samsung.com>
---
 src/bin/edje/edje_cc_out.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/bin/edje/edje_cc_out.c b/src/bin/edje/edje_cc_out.c
index 40b9ef6..a900b40 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);

-- 


Reply via email to