Added NULL check for GetDoxmResourceData
authorsahil bansal <sahil.bansal@samsung.com>
Thu, 13 Oct 2016 10:35:15 +0000 (16:05 +0530)
committerRandeep Singh <randeep.s@samsung.com>
Fri, 14 Oct 2016 06:31:11 +0000 (06:31 +0000)
Change-Id: Iea981a40ebaccef368ae4cbd834c30cb124fd76c
Signed-off-by: sahil bansal <sahil.bansal@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/13229
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
resource/csdk/security/src/pconfresource.c

index b216e62..cadf8c3 100644 (file)
@@ -892,7 +892,7 @@ static OCEntityHandlerResult HandlePconfPostRequest (const OCEntityHandlerReques
     OCStackResult res=OC_STACK_OK;
     OicSecPconf_t* newPconf = NULL;
 
-    if (true == GetDoxmResourceData()->dpc)
+    if (NULL != GetDoxmResourceData() && true == GetDoxmResourceData()->dpc)
     {
         // Convert CBOR PCONF data into binary. This will also validate the PCONF data received.
         uint8_t *payload = ((OCSecurityPayload *) ehRequest->payload)->securityData;