summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@osg.samsung.com>2015-05-20 18:11:02 +0100
committerDaniel Kolesa <d.kolesa@osg.samsung.com>2015-05-20 18:11:02 +0100
commit370f406d2f70bea44652480c54b16b0bef6236f9 (patch)
tree25ea12d3f3b39e943142d37a3a372b1469f5e686
parent54974b074b4031c25947576bcf4809c66d93d858 (diff)
eolian: properly handle errors in database_fill
Fixes CID 1299294. @fix
-rw-r--r--src/lib/eolian/database_fill.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/lib/eolian/database_fill.c b/src/lib/eolian/database_fill.c
index e1ef5b066f..38ff1a31d9 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)
224 if (!ls) 224 if (!ls)
225 { 225 {
226 fprintf(stderr, "eolian: unable to create lexer for file '%s'\n", filename); 226 fprintf(stderr, "eolian: unable to create lexer for file '%s'\n", filename);
227 return EINA_FALSE; 227 goto error;
228 } 228 }
229 229
230 /* read first token */ 230 /* read first token */
231 eo_lexer_get(ls); 231 eo_lexer_get(ls);
232 232
233 if (!eo_parser_walk(ls, eot)) 233 if (!eo_parser_walk(ls, eot))
234 { 234 goto error;
235 eo_lexer_free(ls);
236 return EINA_FALSE;
237 }
238 235
239 if (eot) goto done; 236 if (eot) goto done;
240 237
241 if (!eina_list_count(ls->tmp.classes)) 238 if (!eina_list_count(ls->tmp.classes))
242 { 239 {
243 fprintf(stderr, "eolian: no classes for file '%s'\n", filename); 240 fprintf(stderr, "eolian: no classes for file '%s'\n", filename);
244 eo_lexer_free(ls); 241 goto error;
245 return EINA_FALSE;
246 } 242 }
247 243
248 while (ls->tmp.classes) 244 while (ls->tmp.classes)