From a54876ea206dabd99a225f9c43ba1be33c8e03be Mon Sep 17 00:00:00 2001 From: Scott Long Date: Mon, 4 Jun 2007 04:35:04 +0000 Subject: [PATCH] Free the portinfo object on unload. --- sys/dev/mpt/mpt_cam.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/dev/mpt/mpt_cam.c b/sys/dev/mpt/mpt_cam.c index 4c7ddf3baca..f1e6eef4fd9 100644 --- a/sys/dev/mpt/mpt_cam.c +++ b/sys/dev/mpt/mpt_cam.c @@ -1199,6 +1199,10 @@ mpt_cam_detach(struct mpt_softc *mpt) mpt_free_request(mpt, mpt->tmf_req); mpt->tmf_req = NULL; } + if (mpt->sas_portinfo != NULL) { + free(mpt->sas_portinfo, M_DEVBUF); + mpt->sas_portinfo = NULL; + } MPT_UNLOCK(mpt); if (mpt->sim != NULL) {