Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/usb Free memory in the correct order. Pointed out b...



details:   https://anonhg.NetBSD.org/src/rev/f5708665a093
branches:  trunk
changeset: 570728:f5708665a093
user:      augustss <augustss%NetBSD.org@localhost>
date:      Tue Oct 26 05:00:59 2004 +0000

description:
Free memory in the correct order.  Pointed out by Jeff Rizzo.

diffstat:

 sys/dev/usb/uhub.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (29 lines):

diff -r 89c53083774b -r f5708665a093 sys/dev/usb/uhub.c
--- a/sys/dev/usb/uhub.c        Tue Oct 26 04:34:46 2004 +0000
+++ b/sys/dev/usb/uhub.c        Tue Oct 26 05:00:59 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uhub.c,v 1.70 2004/10/23 16:17:56 augustss Exp $       */
+/*     $NetBSD: uhub.c,v 1.71 2004/10/26 05:00:59 augustss Exp $       */
 /*     $FreeBSD: src/sys/dev/usb/uhub.c,v 1.18 1999/11/17 22:33:43 n_hibma Exp $       */
 
 /*
@@ -43,7 +43,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uhub.c,v 1.70 2004/10/23 16:17:56 augustss Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uhub.c,v 1.71 2004/10/26 05:00:59 augustss Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -588,9 +588,9 @@
        usbd_add_drv_event(USB_EVENT_DRIVER_DETACH, sc->sc_hub,
                           USBDEV(sc->sc_dev));
 
-       free(hub, M_USBDEV);
        if (hub->ports[0].tt)
                free(hub->ports[0].tt, M_USBDEV);
+       free(hub, M_USBDEV);
        sc->sc_hub->hub = NULL;
 
        return (0);



Home | Main Index | Thread Index | Old Index