connectivity: Fixed double free issue when destroying endpoint
authorPhilippe Coval <philippe.coval@osg.samsung.com>
Thu, 19 Jan 2017 03:52:31 +0000 (12:52 +0900)
committerAshok Babu Channa <ashok.channa@samsung.com>
Wed, 15 Feb 2017 10:18:35 +0000 (10:18 +0000)
[hyuna0213.jo]

- after destroying memory, set NULL value to prevent double free
- add the usage of oc_mutex_lock() when block data is updated

[Philippe Coval]

Ported from 1.2-rel branch to master

Conflicts:
resource/csdk/connectivity/inc/cablockwisetransfer.h
resource/csdk/connectivity/src/cablockwisetransfer.c

Change-Id: I78d0d46e37333e099ec737ac4500a2f388d58c4e
Signed-off-by: hyuna0213.jo <hyuna0213.jo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15447
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: Jaehong Jo <jaehong.jo@samsung.com>
Reviewed-by: jihwan seo <jihwan.seo@samsung.com>
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/16567
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: byonggon chun <bg.chun@samsung.com>
Author: hyuna0213.jo <hyuna0213.jo@samsung.com>
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/17021

resource/csdk/connectivity/inc/cablockwisetransfer.h

index dcf9cd3..3581186 100644 (file)
@@ -497,7 +497,7 @@ CAData_t *CAGetDataSetFromBlockDataList(const CABlockDataID_t *blockID);
  * Update the block data from block-wise transfer list.
  * @param[in]   blockID     ID set of CABlockData.
  * @param[in]   sendData    New block date should be sent.
- * @return CAData structure.
+ * @return CABlockData_t structure.
  */
 CABlockData_t *CAUpdateDataSetFromBlockDataList(const CABlockDataID_t *blockID,
                                                 const CAData_t *sendData);