Fixed memory leak while sending the response in SRM
Dynamic memory was being allocated while forming the OCSecurityPayload
and was not freed. Also, updated code in ocserverrequest.c to replace
dynamic memory allocation with local variable on the function stack for
CAToken variable.
Change-Id: I4372fe46001c10cb68d069cae5916c8798913121
Signed-off-by: Sachin Agrawal <sachin.agrawal@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1815
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Erich Keane <erich.keane@intel.com>