Two memory leaks fixed. One after a response is sent and one when a
server request is deleted. malloc'ed tokens were not free'd in both
instances.
Change-Id: I125bab278dd8542ff5970e6655b24a5cbacfe7e9
Signed-off-by: Mandeep Shetty <mandeep.shetty@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1040
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Sakthivel Samidurai <sakthivel.samidurai@intel.com>
Reviewed-by: Erich Keane <erich.keane@intel.com>
if(serverRequest)
{
LL_DELETE(serverRequestList, serverRequest);
+ OCFree(serverRequest->requestToken);
OCFree(serverRequest);
serverRequest = NULL;
OC_LOG(INFO, TAG, PCF("Server Request Removed!!"));
}
#endif
+ OCFree(responseInfo.info.token);
OCFree(responseInfo.info.options);
//Delete the request
FindAndDeleteServerRequest(serverRequest);