diff options
author | sourav bhuwalka <s.bhuwalka@samsung.com> | 2019-09-26 23:40:08 +0530 |
---|---|---|
committer | DoHyun Pyun <dh79.pyun@samsung.com> | 2019-10-14 09:57:59 +0900 |
commit | 22410897e4072dffa4318220527d2fe12bb6f6c7 (patch) | |
tree | 005b5d9ab934625e9cc32b4f8dcba5c581ee2fa2 | |
parent | 916a88f2a3192652d4650170dd56ce1af2648f8b (diff) | |
download | iotivity-22410897e4072dffa4318220527d2fe12bb6f6c7.tar.gz iotivity-22410897e4072dffa4318220527d2fe12bb6f6c7.tar.bz2 iotivity-22410897e4072dffa4318220527d2fe12bb6f6c7.zip |
Crash at CADestroyDataSet()
Setting info->token to NULL after free to avoid double free
https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/582
(cherry-picked from 3fb0338b52b04ee58f12bb46f27ef20cf12c2d47)
Change-Id: If6268f9ebb9965b84809c54d38b3b3826cf51830
Signed-off-by: sourav bhuwalka <s.bhuwalka@samsung.com>
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
-rw-r--r-- | resource/csdk/connectivity/src/camessagehandler.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/resource/csdk/connectivity/src/camessagehandler.c b/resource/csdk/connectivity/src/camessagehandler.c index c4b25ddbf..c91f8206d 100644 --- a/resource/csdk/connectivity/src/camessagehandler.c +++ b/resource/csdk/connectivity/src/camessagehandler.c @@ -861,6 +861,7 @@ static CAResult_t CAReceivedPacketCallback(const CASecureEndpoint_t *sep, { OIC_LOG(ERROR, TAG, "fail to get Token from retransmission list"); OICFree(info->token); + info->token = NULL; info->tokenLength = 0; } } |