From 52fab4e55de2122e475bac6d09c2f694c283d3ef Mon Sep 17 00:00:00 2001 From: Gwanglim Lee Date: Wed, 6 Aug 2014 10:55:32 +0100 Subject: [PATCH] edje: fix coverity defects Summary: CID 1214113: logically dead code CID 1230295: dereference null return value CID 1230296: use after free @fix Test Plan: N/A Reviewers: raster, cedric, jpeg, q66 Reviewed By: q66 Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D1275 --- src/bin/edje/edje_cc_handlers.c | 4 ++-- src/bin/edje/edje_cc_parse.c | 8 -------- src/lib/edje/edje_smart.c | 2 +- 3 files changed, 3 insertions(+), 11 deletions(-) diff --git a/src/bin/edje/edje_cc_handlers.c b/src/bin/edje/edje_cc_handlers.c index 8642e80..c46da33 100644 --- a/src/bin/edje/edje_cc_handlers.c +++ b/src/bin/edje/edje_cc_handlers.c @@ -5582,9 +5582,9 @@ static void st_collections_group_parts_part_box_items_item_type(void) s = parse_str(0); if (strcmp(s, "GROUP")) { + ERR("parse error %s:%i. token %s not one of: GROUP.", + file_in, line - 1, s); free(s); - ERR("parse error %s:%i. token %s not one of: GROUP.", - file_in, line - 1, s); exit(-1); } free(s); diff --git a/src/bin/edje/edje_cc_parse.c b/src/bin/edje/edje_cc_parse.c index b0b5ba4..14546c1 100644 --- a/src/bin/edje/edje_cc_parse.c +++ b/src/bin/edje/edje_cc_parse.c @@ -715,14 +715,6 @@ parse(char *data, off_t size) } else { - if (do_params) - { - ERR("parse error %s:%i. additional parameters required for '%s' statement", - file_in, line - 1, (char*)eina_list_last_data_get(stack)); - err_show(); - exit(-1); - } - if (new_statement_single()) stack_pop(); } diff --git a/src/lib/edje/edje_smart.c b/src/lib/edje/edje_smart.c index 6be14de..816d2d5 100644 --- a/src/lib/edje/edje_smart.c +++ b/src/lib/edje/edje_smart.c @@ -295,7 +295,7 @@ _edje_object_evas_object_smart_show(Eo *obj, Edje *ed) if (edg == ed) continue; rp = evas_object_data_get(edg->obj, "\377 edje.part_obj"); - if (rp->chosen_description->visible) + if ((rp) && (rp->chosen_description->visible)) evas_object_show(edg->obj); } } -- 2.7.4