Fix defect detected by static code analyzer
authorYunheeHwang <yunhee.hwang@samsung.com>
Wed, 29 Mar 2017 09:45:47 +0000 (18:45 +0900)
committerDan Mihai <Daniel.Mihai@microsoft.com>
Fri, 31 Mar 2017 17:05:10 +0000 (17:05 +0000)
commit596cecfdec5a490168f82ca0d9b37ebaa3cfa3d1
tree9afe8a45193eaa1e5e54207d3cf91c3f4e3fef42
parentfeba13f7d0d8a4226e526c092eb050855c2caee8
Fix defect detected by static code analyzer

Problem : Dynamic memory referenced by (*set)->actionsetName was allocated by calling malloc and lost without free before exit
Resolve : add OCFREE((*set)->actionsetName) before OCFREE(*set)

Problem : Dynamic memory referenced by payload was allocated by calling function 'OCRepPayloadCreate' and lost without free before exit
Resolve : add OCRepPayloadDestroy(payload) to free them

Change-Id: I2f8bbbd009c567cda8c091ffde925f1692416c9b
Signed-off-by: YunheeHwang <yunhee.hwang@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18259
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
resource/csdk/stack/src/oicgroup.c