Fix segfault on presence payload destroy.
authorMandeep Shetty <mandeep.shetty@intel.com>
Mon, 3 Aug 2015 17:27:46 +0000 (10:27 -0700)
committerErich Keane <erich.keane@intel.com>
Mon, 3 Aug 2015 20:33:03 +0000 (20:33 +0000)
Two pointers pointd to the same memory location and both pointers were
free'd. One was free'd explicitly and the other was free'd as part of
freeing a struct in OCPresencePayloadDestroy.

Change-Id: Ieb3517ffeb4ab0abc4e6e7ff2b6b3b44a82264bf
Signed-off-by: Mandeep Shetty <mandeep.shetty@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/2086
Reviewed-by: Omkar Hegde <omkar.m.hegde@intel.com>
Reviewed-by: Erich Keane <erich.keane@intel.com>
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
resource/csdk/stack/src/ocstack.c

index e08b430..12adb2f 100644 (file)
@@ -996,7 +996,6 @@ OCStackResult HandlePresenceResponse(const CAEndpoint_t *endpoint,
     }
 
 exit:
-    OICFree(resourceTypeName);
     OCPayloadDestroy(response.payload);
     return result;
 }