diff options
author | youngman <yman.jung@samsung.com> | 2016-08-12 16:20:33 +0900 |
---|---|---|
committer | Youngjae Shin <yj99.shin@samsung.com> | 2016-08-18 17:50:06 +0900 |
commit | 918cbb4172e70b1d4ecf9cc1a02132ee1a1d5d76 (patch) | |
tree | 4378fcc33de62ed8d4fb26a5f56aa616f6dbf4a9 | |
parent | 0e244927cabeac1c049935260efb03c7a0302dbb (diff) | |
download | iotivity-918cbb4172e70b1d4ecf9cc1a02132ee1a1d5d76.tar.gz iotivity-918cbb4172e70b1d4ecf9cc1a02132ee1a1d5d76.tar.bz2 iotivity-918cbb4172e70b1d4ecf9cc1a02132ee1a1d5d76.zip |
(double free) crash occurred when discovering devicesubmit/tizen/20160818.093637accepted/tizen/wearable/20160819.063415accepted/tizen/tv/20160819.063426accepted/tizen/mobile/20160819.063434accepted/tizen/ivi/20160819.063442accepted/tizen/common/20160818.144659
Change-Id: I5ae6cbe8e62e5b0aeb0dd34a5d239cc7761b2ea9
Signed-off-by: youngman <yman.jung@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/10331
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Youngjae Shin <yj99.shin@samsung.com>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
3 files changed, 6 insertions, 6 deletions
diff --git a/resource/csdk/security/provisioning/include/pmutility.h b/resource/csdk/security/provisioning/include/pmutility.h index c36b2041e..2a6424831 100644 --- a/resource/csdk/security/provisioning/include/pmutility.h +++ b/resource/csdk/security/provisioning/include/pmutility.h @@ -109,7 +109,7 @@ void PMPrintOCProvisionDev(const OCProvisionDev_t* pDev); * @return true when deletion is happened, false when no deletion is occured. In case either of * two arguments is null it will return false. */ -bool PMDeleteFromUUIDList(OCUuidList_t *pUuidList, OicUuid_t *targetId); +bool PMDeleteFromUUIDList(OCUuidList_t **pUuidList, OicUuid_t *targetId); #ifdef __cplusplus } diff --git a/resource/csdk/security/provisioning/src/ocprovisioningmanager.c b/resource/csdk/security/provisioning/src/ocprovisioningmanager.c index 1fb938863..34d3a1ff4 100644 --- a/resource/csdk/security/provisioning/src/ocprovisioningmanager.c +++ b/resource/csdk/security/provisioning/src/ocprovisioningmanager.c @@ -891,7 +891,7 @@ OCStackResult OCGetDevInfoFromNetwork(unsigned short waittime, size_t deleteCnt = 0; while (pCurDev) { - if(true == PMDeleteFromUUIDList(uuidList, &pCurDev->doxm->deviceID)) + if(true == PMDeleteFromUUIDList(&uuidList, &pCurDev->doxm->deviceID)) { deleteCnt++; } diff --git a/resource/csdk/security/provisioning/src/pmutility.c b/resource/csdk/security/provisioning/src/pmutility.c index 56bf9b240..47f1c3fa4 100644 --- a/resource/csdk/security/provisioning/src/pmutility.c +++ b/resource/csdk/security/provisioning/src/pmutility.c @@ -943,18 +943,18 @@ void PMPrintOCProvisionDev(const OCProvisionDev_t* pDev) } } -bool PMDeleteFromUUIDList(OCUuidList_t *pUuidList, OicUuid_t *targetId) +bool PMDeleteFromUUIDList(OCUuidList_t **pUuidList, OicUuid_t *targetId) { - if(pUuidList == NULL || targetId == NULL) + if(*pUuidList == NULL || targetId == NULL) { return false; } OCUuidList_t *tmp1 = NULL,*tmp2=NULL; - LL_FOREACH_SAFE(pUuidList, tmp1, tmp2) + LL_FOREACH_SAFE(*pUuidList, tmp1, tmp2) { if(0 == memcmp(tmp1->dev.id, targetId->id, sizeof(targetId->id))) { - LL_DELETE(pUuidList, tmp1); + LL_DELETE(*pUuidList, tmp1); OICFree(tmp1); return true; } |