From 68cba5536261ecfb6a1ae7d66fbdd97474906746 Mon Sep 17 00:00:00 2001 From: sam Date: Sun, 29 Jun 2003 23:58:38 +0000 Subject: plug xform memory leaks: o add missing zeroize op when deleting an SA o don't re-initialize an xform for an SA that already has one Submitted by: Doug Ambrisko MFC after: 1 day --- sys/netipsec/ipsec.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sys/netipsec/ipsec.c') diff --git a/sys/netipsec/ipsec.c b/sys/netipsec/ipsec.c index 1eb0f6a..bbbe0ce 100644 --- a/sys/netipsec/ipsec.c +++ b/sys/netipsec/ipsec.c @@ -1922,6 +1922,8 @@ xform_init(struct secasvar *sav, int xftype) { struct xformsw *xsp; + if (sav->tdb_xform != NULL) /* previously initialized */ + return 0; for (xsp = xforms; xsp; xsp = xsp->xf_next) if (xsp->xf_type == xftype) return (*xsp->xf_init)(sav, xsp); -- cgit v1.1