--- a/src/rcfg.c +++ b/src/rcfg.c @@ -166,7 +166,8 @@ static void handle_stage(rcfg_ctx *ctx, const uint8_t *val, uint16_t len) /* DROP: discard the staged record without committing it. */ static void handle_drop(rcfg_ctx *ctx) { free(ctx->pending); + ctx->pending = NULL; } /* FLUSH: commit the staged record by recording its tag. */