From b09b28603f6d8eab8e34049474e1d64e4bb35fc6 Mon Sep 17 00:00:00 2001 From: Martin Hedenfal Date: Mon, 5 Jul 2010 17:11:42 +0000 Subject: Plug a memory leak when aborting transactions. --- usr.sbin/ldapd/btree.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'usr.sbin/ldapd/btree.c') diff --git a/usr.sbin/ldapd/btree.c b/usr.sbin/ldapd/btree.c index 9d3b6590871..3a869b2b5b5 100644 --- a/usr.sbin/ldapd/btree.c +++ b/usr.sbin/ldapd/btree.c @@ -1,4 +1,4 @@ -/* $OpenBSD: btree.c,v 1.22 2010/07/02 01:43:00 martinh Exp $ */ +/* $OpenBSD: btree.c,v 1.23 2010/07/05 17:11:41 martinh Exp $ */ /* * Copyright (c) 2009, 2010 Martin Hedenfalk @@ -705,6 +705,7 @@ btree_txn_abort(struct btree_txn *txn) assert(mp->ref == 0); /* cursors should be closed */ mpage_del(bt, mp); SIMPLEQ_REMOVE_HEAD(txn->dirty_queue, next); + mpage_free(mp); } DPRINTF("releasing write lock on txn %p", txn); -- cgit v1.2.3