Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern don't increment the number of referenced module as ...
details: https://anonhg.NetBSD.org/src/rev/dd94945061c9
branches: trunk
changeset: 769555:dd94945061c9
user: christos <christos%NetBSD.org@localhost>
date: Wed Sep 14 12:29:22 2011 +0000
description:
don't increment the number of referenced module as a side effect if we fail.
>From jmcneill
diffstat:
sys/kern/kern_module.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (31 lines):
diff -r a96d3ad5838b -r dd94945061c9 sys/kern/kern_module.c
--- a/sys/kern/kern_module.c Wed Sep 14 12:28:08 2011 +0000
+++ b/sys/kern/kern_module.c Wed Sep 14 12:29:22 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_module.c,v 1.80 2011/08/13 21:04:06 christos Exp $ */
+/* $NetBSD: kern_module.c,v 1.81 2011/09/14 12:29:22 christos Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_module.c,v 1.80 2011/08/13 21:04:06 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_module.c,v 1.81 2011/09/14 12:29:22 christos Exp $");
#define _MODULE_INTERNAL
@@ -1032,10 +1032,10 @@
goto fail;
}
error = module_do_load(buf, true, flags, NULL,
- &mod->mod_required[mod->mod_nrequired++],
- MODULE_CLASS_ANY, true);
+ &mod2, MODULE_CLASS_ANY, true);
if (error != 0)
goto fail;
+ mod->mod_required[mod->mod_nrequired++] = mod2;
}
}
Home |
Main Index |
Thread Index |
Old Index