From: sourav bhuwalka Date: Thu, 26 Sep 2019 18:10:08 +0000 (+0530) Subject: Crash at CADestroyDataSet() X-Git-Tag: accepted/tizen/5.5/unified/20191031.011923~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=22410897e4072dffa4318220527d2fe12bb6f6c7;hp=916a88f2a3192652d4650170dd56ce1af2648f8b;p=platform%2Fupstream%2Fiotivity.git 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 Signed-off-by: DoHyun Pyun --- diff --git a/resource/csdk/connectivity/src/camessagehandler.c b/resource/csdk/connectivity/src/camessagehandler.c index c4b25dd..c91f820 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; } }