Fixed memory leak while sending the response in SRM
authorSachin Agrawal <sachin.agrawal@intel.com>
Wed, 22 Jul 2015 16:20:11 +0000 (09:20 -0700)
committerErich Keane <erich.keane@intel.com>
Wed, 22 Jul 2015 22:06:17 +0000 (22:06 +0000)
commitcb4bbd915048862e87bb74604c8c6a362c46ec09
treec1d52244c46d6e133b811105e2daab39ba0d5bb4
parent3965a4fae0bbdb05369d22b5913fd8d142bcec7b
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>
resource/csdk/security/src/resourcemanager.c
resource/csdk/stack/src/ocserverrequest.c