eldbus: Fix dereference after null check
authorChristopher Michael <cp.michael@samsung.com>
Fri, 15 Mar 2019 16:14:18 +0000 (12:14 -0400)
committerYeongjong Lee <yj34.lee@samsung.com>
Tue, 2 Apr 2019 03:45:17 +0000 (12:45 +0900)
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

src/lib/eldbus/eldbus_model_proxy.c

index d571732..00d85b4 100644 (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);