diff options
author | Eric Faurot <eric@cvs.openbsd.org> | 2012-09-18 15:35:14 +0000 |
---|---|---|
committer | Eric Faurot <eric@cvs.openbsd.org> | 2012-09-18 15:35:14 +0000 |
commit | 0a63ecab7e23be80d4195d74f0b8885cc59a588e (patch) | |
tree | d09102bcf7c109859743ba651527c55118892c9c /usr.sbin/smtpd/lka_session.c | |
parent | 562a1c010a38a90ebaa16b32fc212eb73b1c1c80 (diff) |
make use of expandtree_free_nodes() in lka_session_destroy().
change to a simpler implementation for it while there.
ok gilles@
Diffstat (limited to 'usr.sbin/smtpd/lka_session.c')
-rw-r--r-- | usr.sbin/smtpd/lka_session.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/usr.sbin/smtpd/lka_session.c b/usr.sbin/smtpd/lka_session.c index ebfb374d512..eebee6052e1 100644 --- a/usr.sbin/smtpd/lka_session.c +++ b/usr.sbin/smtpd/lka_session.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lka_session.c,v 1.26 2012/09/18 14:23:01 eric Exp $ */ +/* $OpenBSD: lka_session.c,v 1.27 2012/09/18 15:35:13 eric Exp $ */ /* * Copyright (c) 2011 Gilles Chehade <gilles@openbsd.org> @@ -321,18 +321,13 @@ static void lka_session_destroy(struct lka_session *lks) { struct envelope *ep; - struct expandnode *xn; while ((ep = TAILQ_FIRST(&lks->deliverylist)) != NULL) { TAILQ_REMOVE(&lks->deliverylist, ep, entry); free(ep); } - while ((xn = RB_ROOT(&lks->expandtree)) != NULL) { - RB_REMOVE(expandtree, &lks->expandtree, xn); - free(xn); - } - + expandtree_free_nodes(&lks->expandtree); tree_xpop(&sessions, lks->id); free(lks); } |