Merge branch '1.1-rel'
[platform/upstream/iotivity.git] / resource / csdk / security / src / amsmgr.c
index 9486f90..4ead7a3 100644 (file)
@@ -327,6 +327,11 @@ OCStackResult UpdateAmsMgrContext(PEContext_t *context, const CAEndpoint_t *endp
 {
     OCStackResult ret = OC_STACK_ERROR;
 
+    if (!context->amsMgrContext)
+    {
+        goto exit;
+    }
+
     //The AmsMgr context endpoint and requestInfo will be free from ,
     //AmsMgrAclReqCallback function
     if (context->amsMgrContext->endpoint)
@@ -354,7 +359,7 @@ void FreeCARequestInfo(CARequestInfo_t *requestInfo)
 {
     if (NULL == requestInfo)
     {
-        OIC_LOG_V(ERROR, TAG, "%s: Can't free memory. Received NULL requestInfo", __func__);
+        OIC_LOG_V(DEBUG, TAG, "%s: Can't free memory. Received NULL requestInfo", __func__);
         return;
     }
     OICFree(requestInfo->info.token);