- if ((CborErrorOutOfMemory == cborEncoderResult) && (cborLen < CBOR_MAX_SIZE))
- {
- // reallocate and try again!
- OICFree(outPayload);
- // Since the allocated initial memory failed, double the memory.
- cborLen += cbor_encoder_get_buffer_size(&encoder, encoder.end);
- cborEncoderResult = CborNoError;
- ret = CrlToCBORPayload(crl, payload, &cborLen, lastUpdate);
- }
-