From 369bbb548d98fcdd04e87783cf184faa07184896 Mon Sep 17 00:00:00 2001 From: Yoshihiro Takahashi Date: Sun, 10 Mar 2002 07:22:42 +0000 Subject: [PATCH] Free allocated buffer at siodetach(). MFC after: 3 days --- sys/pc98/cbus/sio.c | 4 ++++ sys/pc98/pc98/sio.c | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/sys/pc98/cbus/sio.c b/sys/pc98/cbus/sio.c index 4a455e3dc59..b49506d12a4 100644 --- a/sys/pc98/cbus/sio.c +++ b/sys/pc98/cbus/sio.c @@ -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); } diff --git a/sys/pc98/pc98/sio.c b/sys/pc98/pc98/sio.c index 4a455e3dc59..b49506d12a4 100644 --- a/sys/pc98/pc98/sio.c +++ b/sys/pc98/pc98/sio.c @@ -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); }