Module Name:    src
Committed By:   pgoyette
Date:           Sat Apr 25 00:54:14 UTC 2015

Modified Files:
        src/sys/dev/sysmon: sysmon_envsys.c

Log Message:
Release the mutex in the error path.


To generate a diff of this commit:
cvs rdiff -u -r1.133 -r1.134 src/sys/dev/sysmon/sysmon_envsys.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/dev/sysmon/sysmon_envsys.c
diff -u src/sys/dev/sysmon/sysmon_envsys.c:1.133 src/sys/dev/sysmon/sysmon_envsys.c:1.134
--- src/sys/dev/sysmon/sysmon_envsys.c:1.133	Fri Apr 24 11:34:14 2015
+++ src/sys/dev/sysmon/sysmon_envsys.c	Sat Apr 25 00:54:14 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: sysmon_envsys.c,v 1.133 2015/04/24 11:34:14 pgoyette Exp $	*/
+/*	$NetBSD: sysmon_envsys.c,v 1.134 2015/04/25 00:54:14 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2007, 2008 Juan Romero Pardines.
@@ -64,7 +64,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sysmon_envsys.c,v 1.133 2015/04/24 11:34:14 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sysmon_envsys.c,v 1.134 2015/04/25 00:54:14 pgoyette Exp $");
 
 #include <sys/param.h>
 #include <sys/types.h>
@@ -779,6 +779,7 @@ sysmon_envsys_register(struct sysmon_env
 	mutex_enter(&sme_global_mtx);
 	if (!prop_dictionary_set(sme_propd, sme->sme_name, array)) {
 		error = EINVAL;
+		mutex_exit(&sme_global_mtx);
 		DPRINTF(("%s: prop_dictionary_set for '%s'\n", __func__,
 		    sme->sme_name));
 		goto out;

Reply via email to