diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1995-12-08 03:03:08 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1995-12-08 03:03:08 +0000 |
commit | acb8669b264008143c8b3faf9e855ab7452cd834 (patch) | |
tree | 68898af3af33b4c61088afe58b8c091d198c4a10 /sys/dev/ccd.c | |
parent | 6fddf6347755207c5da51cb2abe0a4778f16e870 (diff) |
unconfiguring of ccd causes system panic; fix from gdonl@gv.ssi1.com; netbsd pr#1820
Diffstat (limited to 'sys/dev/ccd.c')
-rw-r--r-- | sys/dev/ccd.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/dev/ccd.c b/sys/dev/ccd.c index 759b55b19f6..df29bcf529f 100644 --- a/sys/dev/ccd.c +++ b/sys/dev/ccd.c @@ -1107,8 +1107,9 @@ ccdioctl(dev, cmd, data, flag, p) (void)vn_close(cs->sc_cinfo[i].ci_vp, FREAD|FWRITE, p->p_ucred, p); free(cs->sc_cinfo[i].ci_path, M_DEVBUF); - free(cs->sc_itable[i].ii_index, M_DEVBUF); } + for (i = 0; cs->sc_itable[i].ii_ndisk; ++i) + free(cs->sc_itable[i].ii_index, M_DEVBUF); free(cs->sc_cinfo, M_DEVBUF); free(cs->sc_itable, M_DEVBUF); bzero(cs, sizeof(struct ccd_softc)); |