Changing Malloc call in CA OCDoResource.
authoromkar <omkar.m.hegde@intel.com>
Tue, 13 Jan 2015 23:57:12 +0000 (15:57 -0800)
committeromkar <omkar.m.hegde@intel.com>
Tue, 13 Jan 2015 23:57:26 +0000 (15:57 -0800)
Previously we were using OICMalloc() to allocate memory to copy the URI
when sending request over multiple interfaces.
During testing, I observed OICMalloc failed in some cases.
Changing the call to OCMalloc instead.

Change-Id: I88ab434d78b3525f6053363fdab7d1d59d8823ed
Signed-off-by: omkar <omkar.m.hegde@intel.com>
resource/csdk/stack/src/ocstack.c

index cd4ea07..d34369d 100644 (file)
@@ -1658,7 +1658,7 @@ OCStackResult OCDoResource(OCDoHandle *handle, OCMethod method, const char *requ
     {
         grpEnd.connectivityType = caConType;
 
-        grpEnd.resourceUri = (CAURI_t) OICMalloc(uriLen + 1);
+        grpEnd.resourceUri = (CAURI_t) OCMalloc(uriLen + 1);
         strncpy(grpEnd.resourceUri, requiredUri, (uriLen + 1));
 
         caResult = CASendRequestToAll(&grpEnd, &requestInfo);