{
OICFree(rt[l]);
}
+ OICFree(rt);
}
for (OCStringLL *rsrcType = (*colPayload)->types; rsrcType; rsrcType = rsrcType->next, arraySize++);
rts[k++] = OICStrdup(rt[l]);
OICFree(rt[l]);
}
+ OICFree(rt);
}
for (OCStringLL *rsrcType = (*colPayload)->types; rsrcType; rsrcType = rsrcType->next, size++)
{
}
ret = SendResponse(colPayload, ehRequest, collResource, ehResult);
OIC_LOG_PAYLOAD(DEBUG, (OCPayload *)colPayload);
-
+ OCRepPayloadDestroy(colPayload);
return ret;
}
OCStackResult stackRet = OC_STACK_OK;
char *storeQuery = NULL;
- OCRepPayload *payload = OCRepPayloadCreate();
OCResource *collResource = (OCResource *)ehRequest->resource;
- VERIFY_PARAM_NON_NULL(TAG, payload, "Failed creating RepPayload");
if (stackRet == OC_STACK_OK)
{
if (collResource->rsrcChildResourcesHead)
{
- storeQuery = OICStrdup(ehRequest->query);
+ storeQuery = ehRequest->query;
ehRequest->query = NULL;
OIC_LOG_V(DEBUG, TAG, "Query : %s", ehRequest->query);
}
}
ehRequest->resource = (OCResourceHandle) collResource;
}
- ehRequest->query = OICStrdup(storeQuery);
- OICFree(storeQuery);
+ ehRequest->query = storeQuery;
return stackRet;
-exit:
- OICFree(storeQuery);
- return OC_STACK_NO_MEMORY;
}
OCStackResult DefaultCollectionEntityHandler(OCEntityHandlerFlag flag, OCEntityHandlerRequest *ehRequest)