eldbus: Fix dereference after null check

Summary:
Coverity reports we are passing NULL variable 'properties' to
eina_array_pop here which dereferences it. Wrap the 'end' block in an
if which checks for valid 'properties' variable

Fixes Coverity CID1399422

@fix

Depends on D8350

Reviewers: raster, cedric, zmike, bu5hm4n, stefan_schmidt

Reviewed By: cedric

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8351
This commit is contained in:
Christopher Michael 2019-03-15 12:14:18 -04:00
parent 12f0dc4fdd
commit 25797aaca0
1 changed files with 3 additions and 1 deletions

View File

@ -662,7 +662,9 @@ _eldbus_model_proxy_property_set_load_cb(void *data,
signature, set_data->value,
_eldbus_model_proxy_property_set_cb, set_data);
pd->pendings = eina_list_append(pd->pendings, pending);
end:
end:
if (!properties) return;
while ((sp = eina_array_pop(properties)))
eina_stringshare_del(sp);
eina_array_free(properties);