commit 431edf443532bbdcdcaaf15338cd65215cf5df14
parent 50c1a4c88e68a89de03001ea5a7f53dcdb4c1704
Author: William Casarin <jb55@jb55.com>
Date: Fri, 11 Jul 2025 12:39:29 -0700
win: fix heap corruption with flatbuf
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/nostrdb.c b/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;