paleolimbot commented on code in PR #570:
URL: https://github.com/apache/arrow-nanoarrow/pull/570#discussion_r1699257957
##########
src/nanoarrow/ipc/encoder.c:
##########
@@ -52,11 +52,13 @@ void ArrowIpcEncoderReset(struct ArrowIpcEncoder* encoder) {
NANOARROW_DCHECK(encoder != NULL && encoder->private_data != NULL);
struct ArrowIpcEncoderPrivate* private =
(struct ArrowIpcEncoderPrivate*)encoder->private_data;
- flatcc_builder_clear(&private->builder);
- ArrowBufferReset(&private->nodes);
- ArrowBufferReset(&private->buffers);
- ArrowFree(private);
- memset(encoder, 0, sizeof(struct ArrowIpcEncoder));
+ if (private != NULL) {
Review Comment:
+1 for consistency with the decoder (I think this is not consistent across
nanoarrow and should be fixed at some point!)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]