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>
OCFREE(desc)
OCFREE(capa)
OCFREE(action)
+ OCFREE((*set)->actionsetName)
OCFREE(*set)
OCFREE(key)
OCFREE(value)
stackRet = OC_STACK_ERROR;
}
}
+ OCRepPayloadDestroy(payload);
}
else if (method == OC_REST_POST)
{
stackRet = OC_STACK_ERROR;
}
}
+ OCRepPayloadDestroy(payload);
}
exit: