diff options
| author | augustss <augustss@NetBSD.org> | 2000-06-06 11:36:21 +0000 |
|---|---|---|
| committer | augustss <augustss@NetBSD.org> | 2000-06-06 11:36:21 +0000 |
| commit | 1c94b92bc440bcb08abb2dfd30ab740fbedee78f (patch) | |
| tree | cf92ae66b28a28084136bcb602ee60de18280d4d /sys/dev/usb | |
| parent | 45c84d3f9c640cce33153891908d93d23821b8e2 (diff) | |
Initialize pointer before doing free of it.
Diffstat (limited to 'sys/dev/usb')
| -rw-r--r-- | sys/dev/usb/usbdi.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/usb/usbdi.c b/sys/dev/usb/usbdi.c index 0ccdbc45b9b..e5d0b295519 100644 --- a/sys/dev/usb/usbdi.c +++ b/sys/dev/usb/usbdi.c @@ -1,4 +1,4 @@ -/* $NetBSD: usbdi.c,v 1.75 2000/06/01 15:51:27 augustss Exp $ */ +/* $NetBSD: usbdi.c,v 1.76 2000/06/06 11:36:21 augustss Exp $ */ /* $FreeBSD: src/sys/dev/usb/usbdi.c,v 1.28 1999/11/17 22:33:49 n_hibma Exp $ */ /* @@ -634,11 +634,12 @@ usbd_set_interface(usbd_interface_handle iface, int altidx) if (LIST_FIRST(&iface->pipes) != 0) return (USBD_IN_USE); + endpoints = iface->endpoints; err = usbd_fill_iface_data(iface->device, iface->index, altidx); if (err) return (err); - /* new setting work, we can free old endpoints */ + /* new setting works, we can free old endpoints */ if (endpoints != NULL) free(endpoints, M_USB); |
