hermet pushed a commit to branch master.

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

commit ecc8b479bdbb52dc91b3a163f4d126682f29615b
Author: Hermet Park <hermetp...@gmail.com>
Date:   Mon Apr 9 11:29:41 2018 +0900

    edje: fix potential memory leak.
    
    next_token() requires free() for it's returned value and a string attribute.
    Here token usage didn't take care of the memory freeing.
    
    @fix
---
 src/bin/edje/edje_cc_script.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/bin/edje/edje_cc_script.c b/src/bin/edje/edje_cc_script.c
index 657bf4fb96..94f7236189 100644
--- a/src/bin/edje/edje_cc_script.c
+++ b/src/bin/edje/edje_cc_script.c
@@ -224,6 +224,13 @@ code_parse_internal(Code *code)
           }
      }
 
+   if (token)
+     {
+        if (token->str)
+          free(token->str);
+        free(token);
+     }
+
    eina_array_free(name_stack);
 }
 

-- 


Reply via email to