From: VBS Date: Thu, 9 May 2019 23:24:19 +0000 (+0900) Subject: Fixed a svace issue X-Git-Tag: submit/tizen/20190509.233015^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ddc3de3df90db11a018f0d95fdd5fa64f33f9ef3;p=platform%2Fcore%2Fapi%2Fzigbee.git Fixed a svace issue - Removing potential risk of memory corruption due to dangling pointer reference. Change-Id: I9fd0749d42c14aa4bed830375b882525303172d5 Signed-off-by: saerome kim --- diff --git a/src/zbl-zcl.c b/src/zbl-zcl.c index 5dc51cd..1a50557 100644 --- a/src/zbl-zcl.c +++ b/src/zbl-zcl.c @@ -832,8 +832,10 @@ API int zb_report_config_record_set_change( NOT_USED(data_type); RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER); - if (h->change) + if (h->change) { free(h->change); + h->change = NULL; + } len = zb_zcl_get_data_size(type); data_type = zb_zcl_get_analog_or_discret(type);