Module Name:    src
Committed By:   pooka
Date:           Thu Feb 18 16:24:19 UTC 2010

Modified Files:
        src/sys/rump/dev/lib/libugenhc: ugenhc.c

Log Message:
Don't leak control endpoint descriptors.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/rump/dev/lib/libugenhc/ugenhc.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/rump/dev/lib/libugenhc/ugenhc.c
diff -u src/sys/rump/dev/lib/libugenhc/ugenhc.c:1.4 src/sys/rump/dev/lib/libugenhc/ugenhc.c:1.5
--- src/sys/rump/dev/lib/libugenhc/ugenhc.c:1.4	Thu Feb 18 16:13:30 2010
+++ src/sys/rump/dev/lib/libugenhc/ugenhc.c	Thu Feb 18 16:24:19 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: ugenhc.c,v 1.4 2010/02/18 16:13:30 pooka Exp $	*/
+/*	$NetBSD: ugenhc.c,v 1.5 2010/02/18 16:24:19 pooka Exp $	*/
 
 /*
  * Copyright (c) 2009 Antti Kantee.  All Rights Reserved.
@@ -61,7 +61,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ugenhc.c,v 1.4 2010/02/18 16:13:30 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ugenhc.c,v 1.5 2010/02/18 16:24:19 pooka Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -623,6 +623,8 @@
 		sc->sc_port_status = ~(UPS_CURRENT_CONNECT_STATUS
 		    | UPS_PORT_ENABLED | UPS_PORT_POWER);
 		sc->sc_port_change = UPS_C_CONNECT_STATUS;
+
+		rumpuser_close(sc->sc_ugenfd[UGEN_EPT_CTRL], &error);
 		sc->sc_ugenfd[UGEN_EPT_CTRL] = -1;
 
 		xfer = sc->sc_intrxfer;

Reply via email to