Fixed a number of KW Memory leaks in ocstack.c
Klocwork discovered a number of memory leaks. This fix repairs most
of them. A few are left behind due to Mandeep's commit in 518,
and Sachin's intent to look into the tok issues.
Change-Id: I92f5902e22dfbaa59e6b7d24985cfa489c93348b
Signed-off-by: Erich Keane <erich.keane@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/520
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Sachin Agrawal <sachin.agrawal@intel.com>
Reviewed-by: Sudarshan Prasad <sudarshan.prasad@intel.com>