diff options
author | jkh <jkh@FreeBSD.org> | 1998-02-22 10:01:23 +0000 |
---|---|---|
committer | jkh <jkh@FreeBSD.org> | 1998-02-22 10:01:23 +0000 |
commit | b3147e8cdbf90187ece6de9d36ab264d9f429134 (patch) | |
tree | 14c8acd95d059bcf391793260bb8e4536a7b7ff6 /sys/geom/geom_ccd.c | |
parent | 8521cad29e2545a569480353ac58abd00a1e56c1 (diff) | |
download | FreeBSD-src-b3147e8cdbf90187ece6de9d36ab264d9f429134.zip FreeBSD-src-b3147e8cdbf90187ece6de9d36ab264d9f429134.tar.gz |
Properly bzero() structures after they're returned from getccdbuf().
Submitted by: Chris Csanady <ccsanady@friley585.res.iastate.edu>
Diffstat (limited to 'sys/geom/geom_ccd.c')
-rw-r--r-- | sys/geom/geom_ccd.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/geom/geom_ccd.c b/sys/geom/geom_ccd.c index b519cb1..839967a 100644 --- a/sys/geom/geom_ccd.c +++ b/sys/geom/geom_ccd.c @@ -1,4 +1,4 @@ -/* $Id: ccd.c,v 1.29 1998/02/15 08:14:39 jkh Exp $ */ +/* $Id: ccd.c,v 1.30 1998/02/15 08:28:26 jkh Exp $ */ /* $NetBSD: ccd.c,v 1.22 1995/12/08 19:13:26 thorpej Exp $ */ @@ -885,6 +885,7 @@ ccdbuffer(cb, cs, bp, bn, addr, bcount) * Fill in the component buf structure. */ cbp = getccdbuf(); + bzero(cbp, sizeof (struct ccdbuf)); cbp->cb_buf.b_flags = bp->b_flags | B_CALL; cbp->cb_buf.b_iodone = (void (*)(struct buf *))ccdiodone; cbp->cb_buf.b_proc = bp->b_proc; @@ -919,6 +920,7 @@ ccdbuffer(cb, cs, bp, bn, addr, bcount) (cbp->cb_buf.b_flags & B_READ) == 0) { /* mirror, start one more write */ cbp = getccdbuf(); + bzero(cbp, sizeof (struct ccdbuf)); *cbp = *cb[0]; cbp->cb_buf.b_dev = ci2->ci_dev; cbp->cb_buf.b_vp = ci2->ci_vp; |