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
This commit is contained in:
Gwanglim Lee 2014-08-06 10:55:32 +01:00 committed by Daniel Kolesa
parent 7a87f322f4
commit 52fab4e55d
3 changed files with 3 additions and 11 deletions

View File

@ -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);

View File

@ -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();
}

View File

@ -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);
}
}