Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/sparc/sparc fix leak.
details: https://anonhg.NetBSD.org/src/rev/4909defddc99
branches: trunk
changeset: 332447:4909defddc99
user: christos <christos%NetBSD.org@localhost>
date: Sun Sep 21 16:36:32 2014 +0000
description:
fix leak.
diffstat:
sys/arch/sparc/sparc/machdep.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diffs (30 lines):
diff -r 7fe3bf6a7c1e -r 4909defddc99 sys/arch/sparc/sparc/machdep.c
--- a/sys/arch/sparc/sparc/machdep.c Sun Sep 21 16:35:44 2014 +0000
+++ b/sys/arch/sparc/sparc/machdep.c Sun Sep 21 16:36:32 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.326 2014/02/28 10:16:51 skrll Exp $ */
+/* $NetBSD: machdep.c,v 1.327 2014/09/21 16:36:32 christos Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -71,7 +71,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.326 2014/02/28 10:16:51 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.327 2014/09/21 16:36:32 christos Exp $");
#include "opt_compat_netbsd.h"
#include "opt_compat_sunos.h"
@@ -1378,8 +1378,10 @@
*/
error = uvm_pglistalloc(size, low, high, 0, 0,
mlist, nsegs, (flags & BUS_DMA_NOWAIT) == 0);
- if (error)
+ if (error) {
+ free(mlist, M_DEVBUF);
return (error);
+ }
/*
* Simply keep a pointer around to the linked list, so
Home |
Main Index |
Thread Index |
Old Index