Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/secmodel Do not release secmodels_lock when it is not held.
details: https://anonhg.NetBSD.org/src/rev/56183dee1ed0
branches: trunk
changeset: 333444:56183dee1ed0
user: maxv <maxv%NetBSD.org@localhost>
date: Tue Nov 04 16:01:58 2014 +0000
description:
Do not release secmodels_lock when it is not held.
Sent on tech-kern@, ok lars@
diffstat:
sys/secmodel/secmodel.c | 14 +++++---------
1 files changed, 5 insertions(+), 9 deletions(-)
diffs (35 lines):
diff -r 8a317f220004 -r 56183dee1ed0 sys/secmodel/secmodel.c
--- a/sys/secmodel/secmodel.c Tue Nov 04 11:27:31 2014 +0000
+++ b/sys/secmodel/secmodel.c Tue Nov 04 16:01:58 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: secmodel.c,v 1.1 2011/12/04 19:24:59 jym Exp $ */
+/* $NetBSD: secmodel.c,v 1.2 2014/11/04 16:01:58 maxv Exp $ */
/*-
* Copyright (c) 2011 Elad Efrat <elad%NetBSD.org@localhost>
* All rights reserved.
@@ -171,10 +171,8 @@
secmodel_t tsm;
int error = 0;
- if (sm == NULL) {
- error = EFAULT;
- goto out;
- }
+ if (sm == NULL)
+ return EFAULT;
/* Check if the secmodel is already present. */
rw_enter(&secmodels_lock, RW_WRITER);
@@ -203,10 +201,8 @@
secmodel_t tsm;
int error = 0;
- if (sm == NULL) {
- error = EFAULT;
- goto out;
- }
+ if (sm == NULL)
+ return EFAULT;
/* Make sure the secmodel is present. */
rw_enter(&secmodels_lock, RW_WRITER);
Home |
Main Index |
Thread Index |
Old Index