Module Name: src
Committed By: christos
Date: Sun Sep 21 16:40:10 UTC 2014
Modified Files:
src/sys/arch/sun68k/sun68k: bus.c
Log Message:
fix leak
To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/sun68k/sun68k/bus.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/arch/sun68k/sun68k/bus.c
diff -u src/sys/arch/sun68k/sun68k/bus.c:1.21 src/sys/arch/sun68k/sun68k/bus.c:1.22
--- src/sys/arch/sun68k/sun68k/bus.c:1.21 Wed Jun 4 08:41:41 2008
+++ src/sys/arch/sun68k/sun68k/bus.c Sun Sep 21 12:40:10 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: bus.c,v 1.21 2008/06/04 12:41:41 ad Exp $ */
+/* $NetBSD: bus.c,v 1.22 2014/09/21 16:40:10 christos Exp $ */
/*
* Copyright (c) 1982, 1986, 1990, 1993
@@ -153,7 +153,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bus.c,v 1.21 2008/06/04 12:41:41 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bus.c,v 1.22 2014/09/21 16:40:10 christos Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -266,8 +266,10 @@ extern paddr_t avail_end;
*/
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