diff options
Diffstat (limited to 'sys/dev/usb/usb_port.h')
| -rw-r--r-- | sys/dev/usb/usb_port.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/dev/usb/usb_port.h b/sys/dev/usb/usb_port.h index bb9addc234a1..abfac816445b 100644 --- a/sys/dev/usb/usb_port.h +++ b/sys/dev/usb/usb_port.h @@ -417,7 +417,11 @@ typedef struct callout usb_callout_t; #define PWR_RESUME 0 #define PWR_SUSPEND 1 -#define config_detach(dev, flag) device_delete_child(device_get_parent(dev), dev) +#define config_detach(dev, flag) \ + do { \ + free(device_get_ivars(dev), M_USB); \ + device_delete_child(device_get_parent(dev), dev); \ + } while (0); typedef struct malloc_type *usb_malloc_type; |
