From: deraadt Date: Fri, 8 Dec 1995 03:03:07 +0000 (+0000) Subject: unconfiguring of ccd causes system panic; fix from gdonl@gv.ssi1.com; netbsd pr#1820 X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=383242302a79b900de3cea3a906fa371513a755a;p=openbsd unconfiguring of ccd causes system panic; fix from gdonl@gv.ssi1.com; netbsd pr#1820 --- 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));