replace : iotivity -> iotivity-sec
[platform/upstream/iotivity.git] / resource / csdk / security / src / verresource.c
index a4478e9..3f0ea0f 100644 (file)
@@ -29,7 +29,6 @@
 #include "ocstack.h"
 #include "oic_malloc.h"
 #include "oic_string.h"
-#include "logger.h"
 #include "payload_logging.h"
 #include "ocpayload.h"
 #include "ocpayloadcbor.h"
@@ -140,6 +139,7 @@ exit:
         OIC_LOG(DEBUG, TAG, "Memory getting reallocated.");
         // reallocate and try again!
         OICFree(outPayload);
+        outPayload = NULL;
         // Since the allocated initial memory failed, double the memory.
         cborLen += cbor_encoder_get_buffer_size(&encoder, encoder.end);
         OIC_LOG_V(DEBUG, TAG, "Ver reallocation size : %zd.", cborLen);
@@ -317,7 +317,7 @@ OCStackResult InitVerResource()
 {
     OCStackResult ret = OC_STACK_ERROR;
 
-    OICStrcpy(gVer.secv, MAX_VERSION_LEN, SECURITY_VERSION);
+    OICStrcpy(gVer.secv, OIC_SEC_MAX_VER_LEN, SECURITY_VERSION);
 
     //Read device id from doxm
     OicUuid_t deviceID = {.id={0}};