Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/usb PR/41602
details: https://anonhg.NetBSD.org/src/rev/50eba596feae
branches: trunk
changeset: 783462:50eba596feae
user: skrll <skrll%NetBSD.org@localhost>
date: Sun Dec 23 17:00:13 2012 +0000
description:
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.
diffstat:
sys/dev/usb/ohci.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diffs (30 lines):
diff -r c2990931a5e1 -r 50eba596feae sys/dev/usb/ohci.c
--- a/sys/dev/usb/ohci.c Sun Dec 23 13:26:21 2012 +0000
+++ b/sys/dev/usb/ohci.c Sun Dec 23 17:00:13 2012 +0000
@@ -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 @@
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));
Home |
Main Index |
Thread Index |
Old Index