Change-Id: Id3aa9a857756a0cda216a12dbef42d9e326998c2
Signed-off-by: amar srivastava <amar.sri@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/17041
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
(cherry picked from commit
2046a5e2643b54a29ee39ce67677b7d574baa832)
Reviewed-on: https://gerrit.iotivity.org/gerrit/17259
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
OIC_LOG(DEBUG, TAG, "Memory getting reallocated.");
// reallocate and try again!
OICFree(outPayload);
+ outPayload = NULL;
// Since the allocated initial memory failed, double the memory.
cborLen += cbor_encoder_get_buffer_size(&encoder, encoder.end);
OIC_LOG_V(DEBUG, TAG, "Doxm reallocation size : %zd.", cborLen);
{
// reallocate and try again!
OICFree(outPayload);
+ outPayload = NULL;
// Since the allocated initial memory failed, double the memory.
cborLen += cbor_encoder_get_buffer_size(&encoder, encoder.end);
cborEncoderResult = CborNoError;
{
// reallocate and try again!
OICFree(outPayload);
+ outPayload = NULL;
// Since the allocated initial memory failed, double the memory.
cborLen += cbor_encoder_get_buffer_size(&encoder, encoder.end);
cborEncoderResult = CborNoError;