summaryrefslogtreecommitdiff
path: root/sys/dev/pci
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2005-11-29 00:03:09 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2005-11-29 00:03:09 +0000
commit00d11c34db2dc7e84c34756f2d88caf815536f18 (patch)
tree97c7ba1cef301c836731a21eeeb36df696899bb7 /sys/dev/pci
parentfafd44ac826dc985f0e4a51070b2fc689b68c58b (diff)
potential memory leak in hifn7751.c:hifn_newsession; 3873, fixed by jason
Diffstat (limited to 'sys/dev/pci')
-rw-r--r--sys/dev/pci/hifn7751.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/pci/hifn7751.c b/sys/dev/pci/hifn7751.c
index ba234829919..81819c9cac1 100644
--- a/sys/dev/pci/hifn7751.c
+++ b/sys/dev/pci/hifn7751.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: hifn7751.c,v 1.149 2004/08/12 18:10:12 jason Exp $ */
+/* $OpenBSD: hifn7751.c,v 1.150 2005/11/29 00:03:08 deraadt Exp $ */
/*
* Invertex AEON / Hifn 7751 driver
@@ -1864,7 +1864,6 @@ hifn_newsession(u_int32_t *sidp, struct cryptoini *cri)
}
}
bzero(ses, sizeof(*ses));
- ses->hs_used = 1;
for (c = cri; c != NULL; c = c->cri_next) {
switch (c->cri_alg) {
@@ -1908,6 +1907,7 @@ hifn_newsession(u_int32_t *sidp, struct cryptoini *cri)
return (EINVAL);
*sidp = HIFN_SID(sc->sc_dv.dv_unit, sesn);
+ ses->hs_used = 1;
return (0);
}