e order - do null check for path and return before alloc of obj

fix coverity CID 1428757
This commit is contained in:
Carsten Haitzler 2020-05-07 17:33:08 +01:00
parent b660ef8937
commit 01f710335a
1 changed files with 5 additions and 3 deletions

View File

@ -62,13 +62,15 @@ e_order_new(const char *path)
{
E_Order *eo;
eo = E_OBJECT_ALLOC(E_Order, E_ORDER_TYPE, _e_order_free);
if (!eo) return NULL;
if (!path)
{
ERR("null order");
return NULL;
}
eo = E_OBJECT_ALLOC(E_Order, E_ORDER_TYPE, _e_order_free);
if (!eo) return NULL;
if (path[0] != '/')
{
ERR("not full");