From 383242302a79b900de3cea3a906fa371513a755a Mon Sep 17 00:00:00 2001 From: deraadt Date: Fri, 8 Dec 1995 03:03:07 +0000 Subject: [PATCH] unconfiguring of ccd causes system panic; fix from gdonl@gv.ssi1.com; netbsd pr#1820 --- sys/dev/ccd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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)); -- 2.20.1