[IOT-2686][Android] Discovery fails for BT/LE 63/22363/3
authorVeeraj Khokale <veeraj.sk@samsung.com>
Thu, 7 Sep 2017 09:06:40 +0000 (14:36 +0530)
committerAshok Babu Channa <ashok.channa@samsung.com>
Fri, 15 Sep 2017 11:48:39 +0000 (11:48 +0000)
OCCopyResource() should not return NULL if creating
the endpoint payload list returns NULL.

Change-Id: I069dbfc0530c2b6560a55e650bc993beef120714
Signed-off-by: Veeraj Khokale <veeraj.sk@samsung.com>
resource/csdk/stack/src/ocpayload.c

index ab392db..12e7c3b 100644 (file)
@@ -1928,11 +1928,8 @@ static OCResourcePayload* OCCopyResource(const OCResource* res, uint16_t secureP
     OCEndpointPayload *selfEp = NULL;
     if (networkInfo && infoSize && devAddr)
     {
-        if(!CreateEndpointPayloadList(res, devAddr, networkInfo, infoSize,
-                                      &(pl->eps), NULL, &selfEp))
-        {
-            return NULL;
-        }
+        CreateEndpointPayloadList(res, devAddr, networkInfo, infoSize,
+                                      &(pl->eps), NULL, &selfEp);
     }
 
     pl->uri = OICStrdup(res->uri);