Fixed a svace issue
[platform/core/api/zigbee.git] / src / zbl-zcl.c
index 5dc51cd..1a50557 100644 (file)
@@ -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);