forked from enlightenment/efl
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
This commit is contained in:
parent
04ea005218
commit
be9343eeb0
|
@ -271,7 +271,7 @@ _eldbus_model_proxy_efl_model_property_set(Eo *obj EINA_UNUSED,
|
|||
const char *property,
|
||||
Eina_Value *value)
|
||||
{
|
||||
Eldbus_Model_Proxy_Property_Set_Data *data;
|
||||
Eldbus_Model_Proxy_Property_Set_Data *data = NULL;
|
||||
const char *signature;
|
||||
Eldbus_Pending *pending;
|
||||
unsigned char access;
|
||||
|
@ -314,6 +314,7 @@ _eldbus_model_proxy_efl_model_property_set(Eo *obj EINA_UNUSED,
|
|||
.data = data, .free = _eldbus_model_proxy_cancel_cb);
|
||||
|
||||
on_error:
|
||||
free(data);
|
||||
return efl_loop_future_rejected(obj, err);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue