From ddc3de3df90db11a018f0d95fdd5fa64f33f9ef3 Mon Sep 17 00:00:00 2001 From: VBS Date: Fri, 10 May 2019 08:24:19 +0900 Subject: [PATCH] Fixed a svace issue - Removing potential risk of memory corruption due to dangling pointer reference. Change-Id: I9fd0749d42c14aa4bed830375b882525303172d5 Signed-off-by: saerome kim --- src/zbl-zcl.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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); -- 2.7.4