diff options
author | Federico G. Schwindt <fgsch@cvs.openbsd.org> | 2000-06-22 23:02:20 +0000 |
---|---|---|
committer | Federico G. Schwindt <fgsch@cvs.openbsd.org> | 2000-06-22 23:02:20 +0000 |
commit | a72626da0fca1e819263b5b089b5847c1d7f13e5 (patch) | |
tree | a9884fc78804e077693c311598707671bc1bfa7f | |
parent | 8c071ac5704a2b42e39d6de756e254db66555988 (diff) |
on unconfig, bzero the key before free; from aazubel@core-sdi.com.
-rw-r--r-- | sys/dev/vnd.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/dev/vnd.c b/sys/dev/vnd.c index ce3c1f51ada..d0229d77561 100644 --- a/sys/dev/vnd.c +++ b/sys/dev/vnd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vnd.c,v 1.24 2000/06/20 21:29:20 provos Exp $ */ +/* $OpenBSD: vnd.c,v 1.25 2000/06/22 23:02:19 fgsch Exp $ */ /* $NetBSD: vnd.c,v 1.26 1996/03/30 23:06:11 christos Exp $ */ /* @@ -863,8 +863,10 @@ vndioctl(dev, cmd, addr, flag, p) printf("vndioctl: CLRed\n"); #endif /* Free crypto key */ - if (vnd->sc_keyctx) + if (vnd->sc_keyctx) { + bzero(vnd->sc_keyctx, vio->vnd_keylen); free((caddr_t)vnd->sc_keyctx, M_DEVBUF); + } /* Detatch the disk. */ disk_detach(&vnd->sc_dk); |