q66 pushed a commit to branch master.

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

commit 370f406d2f70bea44652480c54b16b0bef6236f9
Author: Daniel Kolesa <d.kol...@osg.samsung.com>
Date:   Wed May 20 18:11:02 2015 +0100

    eolian: properly handle errors in database_fill
    
    Fixes CID 1299294.
    
    @fix
---
 src/lib/eolian/database_fill.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/src/lib/eolian/database_fill.c b/src/lib/eolian/database_fill.c
index e1ef5b0..38ff1a3 100644
--- a/src/lib/eolian/database_fill.c
+++ b/src/lib/eolian/database_fill.c
@@ -224,25 +224,21 @@ eo_parser_database_fill(const char *filename, Eina_Bool 
eot)
    if (!ls)
      {
         fprintf(stderr, "eolian: unable to create lexer for file '%s'\n", 
filename);
-        return EINA_FALSE;
+        goto error;
      }
 
    /* read first token */
    eo_lexer_get(ls);
 
    if (!eo_parser_walk(ls, eot))
-     {
-        eo_lexer_free(ls);
-        return EINA_FALSE;
-     }
+     goto error;
 
    if (eot) goto done;
 
    if (!eina_list_count(ls->tmp.classes))
      {
         fprintf(stderr, "eolian: no classes for file '%s'\n", filename);
-        eo_lexer_free(ls);
-        return EINA_FALSE;
+        goto error;
      }
 
    while (ls->tmp.classes)

-- 


Reply via email to