Module Name: src Committed By: skrll Date: Sun Dec 23 17:00:13 UTC 2012
Modified Files: src/sys/dev/usb: ohci.c Log Message: PR/41602 Fix a memory leak when ohci_device_setintr didn't return USBD_NORMAL_COMPLETION. ohci_setup_isoc always returns USBD_NORMAL_COMPLETION at the moment so there's no chance of a leak there. To generate a diff of this commit: cvs rdiff -u -r1.225 -r1.226 src/sys/dev/usb/ohci.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/dev/usb/ohci.c diff -u src/sys/dev/usb/ohci.c:1.225 src/sys/dev/usb/ohci.c:1.226 --- src/sys/dev/usb/ohci.c:1.225 Tue Nov 20 21:16:01 2012 +++ src/sys/dev/usb/ohci.c Sun Dec 23 17:00:13 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: ohci.c,v 1.225 2012/11/20 21:16:01 skrll Exp $ */ +/* $NetBSD: ohci.c,v 1.226 2012/12/23 17:00:13 skrll Exp $ */ /* * Copyright (c) 1998, 2004, 2005, 2012 The NetBSD Foundation, Inc. @@ -41,7 +41,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ohci.c,v 1.225 2012/11/20 21:16:01 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ohci.c,v 1.226 2012/12/23 17:00:13 skrll Exp $"); #include "opt_usb.h" @@ -2209,7 +2209,10 @@ ohci_open(usbd_pipe_handle pipe) ival = pipe->interval; if (ival == USBD_DEFAULT_INTERVAL) ival = ed->bInterval; - return (ohci_device_setintr(sc, opipe, ival)); + err = ohci_device_setintr(sc, opipe, ival); + if (err) + goto bad; + break; case UE_ISOCHRONOUS: pipe->methods = &ohci_device_isoc_methods; return (ohci_setup_isoc(pipe));