summaryrefslogtreecommitdiff
path: root/src/lib/eldbus
diff options
context:
space:
mode:
authorChristopher Michael <cp.michael@samsung.com>2019-03-19 08:57:59 -0400
committerChristopher Michael <cp.michael@samsung.com>2019-03-19 08:57:59 -0400
commitbe9343eeb0f2896f23f1b87100ab4241707dae67 (patch)
tree5a7dc18a5906e193bdf80341cfafc642036c2796 /src/lib/eldbus
parent04ea00521885259c5dfcfd7ffa6e26d2205549d1 (diff)
eldbus: Fix resource leak
Summary: Coverity reports that we leak 'data' here (which can happen if we error on 'eina_value_dup(value)'). Iniitalize 'data' to NULL, and add a 'free' call to cleanup 'data' before we return a rejected future. Fixes Coverity CID1399097 @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/D8352
Diffstat (limited to 'src/lib/eldbus')
-rw-r--r--src/lib/eldbus/eldbus_model_proxy.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/eldbus/eldbus_model_proxy.c b/src/lib/eldbus/eldbus_model_proxy.c
index 00d85b4..bf1f8fb 100644
--- a/src/lib/eldbus/eldbus_model_proxy.c
+++ b/src/lib/eldbus/eldbus_model_proxy.c
@@ -271,7 +271,7 @@ _eldbus_model_proxy_efl_model_property_set(Eo *obj EINA_UNUSED,
271 const char *property, 271 const char *property,
272 Eina_Value *value) 272 Eina_Value *value)
273{ 273{
274 Eldbus_Model_Proxy_Property_Set_Data *data; 274 Eldbus_Model_Proxy_Property_Set_Data *data = NULL;
275 const char *signature; 275 const char *signature;
276 Eldbus_Pending *pending; 276 Eldbus_Pending *pending;
277 unsigned char access; 277 unsigned char access;
@@ -314,6 +314,7 @@ _eldbus_model_proxy_efl_model_property_set(Eo *obj EINA_UNUSED,
314 .data = data, .free = _eldbus_model_proxy_cancel_cb); 314 .data = data, .free = _eldbus_model_proxy_cancel_cb);
315 315
316 on_error: 316 on_error:
317 free(data);
317 return efl_loop_future_rejected(obj, err); 318 return efl_loop_future_rejected(obj, err);
318} 319}
319 320