summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2006-02-27 19:36:22 +0000
committerimp <imp@FreeBSD.org>2006-02-27 19:36:22 +0000
commit3ea32b6618e21f028541d964eea66067a6667874 (patch)
tree68a8e320d0a92fa10eab4b697b03866da5f7c6f9
parentf15451ccbd8b06992fcbc18207d8c4edda6d1042 (diff)
downloadFreeBSD-src-3ea32b6618e21f028541d964eea66067a6667874.zip
FreeBSD-src-3ea32b6618e21f028541d964eea66067a6667874.tar.gz
Don't forget to free the ifaces when we free the ivars
-rw-r--r--sys/dev/usb/usb_port.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/dev/usb/usb_port.h b/sys/dev/usb/usb_port.h
index 4d9a6a5..1978926 100644
--- a/sys/dev/usb/usb_port.h
+++ b/sys/dev/usb/usb_port.h
@@ -433,8 +433,10 @@ typedef struct callout usb_callout_t;
#define config_detach(dev, flag) \
do { \
+ struct usb_attach_arg *uaap = device_get_ivars(dev); \
device_detach(dev); \
- free(device_get_ivars(dev), M_USB); \
+ free(uaap->ifaces, M_USB); \
+ free(uaap, M_USB); \
device_delete_child(device_get_parent(dev), dev); \
} while (0);
OpenPOWER on IntegriCloud