Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev add missing pathbuf_destroy on error path, noticed b...
details: https://anonhg.NetBSD.org/src/rev/0e20dce7e8bb
branches: trunk
changeset: 758877:0e20dce7e8bb
user: dholland <dholland%NetBSD.org@localhost>
date: Fri Nov 19 09:08:26 2010 +0000
description:
add missing pathbuf_destroy on error path, noticed by enami
XXX: this code is wrong; it should not be calling namei and then
XXX: vn_open on the same nameidata.
diffstat:
sys/dev/kloader.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diffs (26 lines):
diff -r d1249f08c542 -r 0e20dce7e8bb sys/dev/kloader.c
--- a/sys/dev/kloader.c Fri Nov 19 07:44:00 2010 +0000
+++ b/sys/dev/kloader.c Fri Nov 19 09:08:26 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kloader.c,v 1.24 2010/11/19 06:44:39 dholland Exp $ */
+/* $NetBSD: kloader.c,v 1.25 2010/11/19 09:08:26 dholland Exp $ */
/*-
* Copyright (c) 2001, 2002, 2004 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kloader.c,v 1.24 2010/11/19 06:44:39 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kloader.c,v 1.25 2010/11/19 09:08:26 dholland Exp $");
#include "debug_kloader.h"
@@ -607,6 +607,7 @@
error = vn_open(&nid, FREAD, 0);
if (error != 0) {
PRINTF("%s: open failed, errno=%d\n", filename, error);
+ pathbuf_destroy(pb);
return (NULL);
}
Home |
Main Index |
Thread Index |
Old Index