Fixed memory leak on OCSetDeviceInfo and CARetransmissionDestroy
[platform/upstream/iotivity.git] / resource / csdk / stack / src / ocresource.c
index a8747ba..70f6924 100755 (executable)
@@ -1436,6 +1436,7 @@ OCStackResult OCSetDeviceInfo(OCDeviceInfo info)
     {
         dataModelVersion = OCCreateOCStringLL(OC_DATA_MODEL_VERSION);
         VERIFY_SUCCESS(OCSetPropertyValue(PAYLOAD_TYPE_DEVICE, OC_RSRVD_DATA_MODEL_VERSION, dataModelVersion));
+        OCFreeOCStringLL(dataModelVersion);
     }
     OIC_LOG(INFO, TAG, "Device parameter initialized successfully.");
     return OC_STACK_OK;