From 8014d772bac979f4959e51b4a2caf3d689b428bc Mon Sep 17 00:00:00 2001 From: William Casarin Date: Fri, 11 Jul 2025 12:26:18 -0700 Subject: [PATCH] nostrdb: mem: builder clear before free --- nostrdb/src/nostrdb.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/nostrdb/src/nostrdb.c b/nostrdb/src/nostrdb.c index 4654c445..bb11499b 100644 --- a/nostrdb/src/nostrdb.c +++ b/nostrdb/src/nostrdb.c @@ -2674,13 +2674,16 @@ void ndb_profile_record_builder_init(struct ndb_profile_record_builder *b) void ndb_profile_record_builder_free(struct ndb_profile_record_builder *b) { - if (b->builder) + if (b->builder) { + flatcc_builder_clear(b->builder); free(b->builder); + } if (b->flatbuf) free(b->flatbuf); b->builder = NULL; b->flatbuf = NULL; + } int ndb_process_profile_note(struct ndb_note *note,