From d5adc4c167f19e7905710cbdcc93a8489521d1c4 Mon Sep 17 00:00:00 2001 From: n_hibma Date: Sat, 30 Jun 2001 10:57:37 +0000 Subject: Don't free memory that has been freed already. Null the pointer after freeing the memory. PR: 27370 Submitted by: Alec Barea MFC after: 5 days --- sys/dev/usb/usbdi_util.c | 1 + 1 file changed, 1 insertion(+) (limited to 'sys/dev/usb/usbdi_util.c') diff --git a/sys/dev/usb/usbdi_util.c b/sys/dev/usb/usbdi_util.c index ff48fd7..3c5b104 100644 --- a/sys/dev/usb/usbdi_util.c +++ b/sys/dev/usb/usbdi_util.c @@ -460,6 +460,7 @@ usbd_alloc_report_desc(ifc, descp, sizep, mem) *sizep, *descp); if (err) { free(*descp, mem); + *descp = NULL; return (err); } return (USBD_NORMAL_COMPLETION); -- cgit v1.1