nostrdb: leak: fix memory leak when failing to write like stats
Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
committed by
Daniel D’Aquino
parent
287b35a8fb
commit
62aa72c215
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user