Free allocated buffer at siodetach().

MFC after:	3 days
This commit is contained in:
nyan 2002-03-10 07:22:42 +00:00
parent ee254812fe
commit 6908e0bef9
2 changed files with 8 additions and 0 deletions

View File

@ -799,6 +799,10 @@ siodetach(dev)
} else {
if (com->ibuf != NULL)
free(com->ibuf, M_DEVBUF);
#ifdef PC98
if (com->obuf1 != NULL)
free(com->obuf1, M_DEVBUF);
#endif
device_set_softc(dev, NULL);
free(com, M_DEVBUF);
}

View File

@ -799,6 +799,10 @@ siodetach(dev)
} else {
if (com->ibuf != NULL)
free(com->ibuf, M_DEVBUF);
#ifdef PC98
if (com->obuf1 != NULL)
free(com->obuf1, M_DEVBUF);
#endif
device_set_softc(dev, NULL);
free(com, M_DEVBUF);
}