diff --git a/nostrdb/src/nostrdb.c b/nostrdb/src/nostrdb.c index 1a130c7a..a38f5293 100644 --- a/nostrdb/src/nostrdb.c +++ b/nostrdb/src/nostrdb.c @@ -2674,12 +2674,12 @@ 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->flatbuf) + flatcc_builder_aligned_free(b->flatbuf); if (b->builder) { flatcc_builder_clear(b->builder); free(b->builder); } - if (b->flatbuf) - free(b->flatbuf); b->builder = NULL; b->flatbuf = NULL;