Multiple Ownership Transfer support.
[platform/upstream/iotivity.git] / resource / csdk / security / provisioning / sample / cloud / cloudCommon.c
index 360ba42..ce7f7e1 100644 (file)
@@ -340,6 +340,7 @@ static OCStackResult saveTrustCert(void)
     if (!readFile(filename, (OCByteString *)&trustCertChainArray))
     {
         OIC_LOG_V(ERROR, TAG, "Can't read %s file", filename);
+        OICFree(((OCByteString *)&trustCertChainArray)->bytes);
         return OC_STACK_ERROR;
     }
     OIC_LOG_BUFFER(DEBUG, TAG, trustCertChainArray.data, trustCertChainArray.len);