nostrdb: win: fix heap corruption with flatbuf
This commit is contained in:
committed by
Daniel D’Aquino
parent
66e10db6b2
commit
387af198d6
@@ -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)
|
void ndb_profile_record_builder_free(struct ndb_profile_record_builder *b)
|
||||||
{
|
{
|
||||||
|
if (b->flatbuf)
|
||||||
|
flatcc_builder_aligned_free(b->flatbuf);
|
||||||
if (b->builder) {
|
if (b->builder) {
|
||||||
flatcc_builder_clear(b->builder);
|
flatcc_builder_clear(b->builder);
|
||||||
free(b->builder);
|
free(b->builder);
|
||||||
}
|
}
|
||||||
if (b->flatbuf)
|
|
||||||
free(b->flatbuf);
|
|
||||||
|
|
||||||
b->builder = NULL;
|
b->builder = NULL;
|
||||||
b->flatbuf = NULL;
|
b->flatbuf = NULL;
|
||||||
|
|||||||
Reference in New Issue
Block a user