nostrdb

an unfairly fast embedded nostr database backed by lmdb
git clone git://jb55.com/nostrdb
Log | Files | Refs | Submodules | README | LICENSE

commit 6ca3f8df654c00899f3b23f88dbd4c8f7e09c454
parent c30d2ee374989391234b7ce7bdecd14b8aa4d1fe
Author: William Casarin <jb55@jb55.com>
Date:   Sun, 15 Dec 2024 10:00:30 -0800

leak: fix memory leak when failing to write like stats

Diffstat:
Msrc/nostrdb.c | 1+
1 file changed, 1 insertion(+), 0 deletions(-)

diff --git a/src/nostrdb.c b/src/nostrdb.c @@ -2835,6 +2835,7 @@ static int ndb_write_reaction_stats(struct ndb_txn *txn, struct ndb_note *note) if ((rc = mdb_put(txn->mdb_txn, txn->lmdb->dbs[NDB_DB_META], &key, &val, 0))) { ndb_debug("write reaction stats to db failed: %s\n", mdb_strerror(rc)); + free(root); return 0; }