Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/xen/x86 Fix a memory leak. Thanks to YAMAMOTO Takas...



details:   https://anonhg.NetBSD.org/src/rev/a261fb34fcf0
branches:  trunk
changeset: 583778:a261fb34fcf0
user:      bouyer <bouyer%NetBSD.org@localhost>
date:      Mon Aug 22 11:04:10 2005 +0000

description:
Fix a memory leak. Thanks to YAMAMOTO Takashi for the notice.

diffstat:

 sys/arch/xen/x86/xen_bus_dma.c |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (26 lines):

diff -r 38e71fdbf87b -r a261fb34fcf0 sys/arch/xen/x86/xen_bus_dma.c
--- a/sys/arch/xen/x86/xen_bus_dma.c    Mon Aug 22 10:57:04 2005 +0000
+++ b/sys/arch/xen/x86/xen_bus_dma.c    Mon Aug 22 11:04:10 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: xen_bus_dma.c,v 1.2 2005/08/20 20:06:24 bouyer Exp $   */
+/*     $NetBSD: xen_bus_dma.c,v 1.3 2005/08/22 11:04:10 bouyer Exp $   */
 /*     NetBSD bus_dma.c,v 1.21 2005/04/16 07:53:35 yamt Exp */
 
 /*-
@@ -39,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xen_bus_dma.c,v 1.2 2005/08/20 20:06:24 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xen_bus_dma.c,v 1.3 2005/08/22 11:04:10 bouyer Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -201,6 +201,7 @@
                         */
                        printf("_xen_bus_dmamem_alloc_range: no way to "
                            "enforce address range\n");
+                       uvm_pglistfree(&mlist);
                        return EINVAL;
                }
                if (bus_curaddr == (bus_lastaddr + PAGE_SIZE)) {



Home | Main Index | Thread Index | Old Index