commit 5a61d99315deb3aec66c6b342e66fea1b688defc
parent 7c047ab79051218601930470d3d3d8d47842fc8b
Author: William Casarin <jb55@jb55.com>
Date: Mon, 16 Dec 2024 16:43:17 -0800
subs: fix memory leak in ndb_subscribe
Signed-off-by: William Casarin <jb55@jb55.com>
Diffstat:
1 file changed, 2 insertions(+), 0 deletions(-)
diff --git a/src/nostrdb.c b/src/nostrdb.c
@@ -4811,6 +4811,8 @@ void ndb_filter_group_destroy(struct ndb_filter_group *group)
static void ndb_subscription_destroy(struct ndb_subscription *sub)
{
ndb_filter_group_destroy(&sub->group);
+ // this was malloc'd inside ndb_subscribe
+ free(sub->inbox.buf);
prot_queue_destroy(&sub->inbox);
sub->subid = 0;
}