summaryrefslogtreecommitdiff
path: root/payloads/libpayload/drivers/usb/usbhid.c
diff options
context:
space:
mode:
Diffstat (limited to 'payloads/libpayload/drivers/usb/usbhid.c')
-rw-r--r--payloads/libpayload/drivers/usb/usbhid.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/payloads/libpayload/drivers/usb/usbhid.c b/payloads/libpayload/drivers/usb/usbhid.c
index 67aebb2ffd..22ed8e7885 100644
--- a/payloads/libpayload/drivers/usb/usbhid.c
+++ b/payloads/libpayload/drivers/usb/usbhid.c
@@ -80,6 +80,9 @@ usb_hid_destroy (usbdev_t *dev)
&dev->endpoints[i], HID_INST(dev)->queue);
HID_INST(dev)->queue = NULL;
}
+ free(HID_INST(dev)->descriptor);
+ HID_INST(dev)->descriptor = NULL;
+
free (dev->data);
}