Module Name:    src
Committed By:   christos
Date:           Tue Dec 30 19:11:44 UTC 2014

Modified Files:
        src/sys/net/npf: npf_nat.c

Log Message:
Don't forget to destroy the mutex before freeing the nat struct on a failed
load.
XXX: pullup -7


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/sys/net/npf/npf_nat.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/net/npf/npf_nat.c
diff -u src/sys/net/npf/npf_nat.c:1.38 src/sys/net/npf/npf_nat.c:1.39
--- src/sys/net/npf/npf_nat.c:1.38	Sat Dec 20 11:19:43 2014
+++ src/sys/net/npf/npf_nat.c	Tue Dec 30 14:11:44 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: npf_nat.c,v 1.38 2014/12/20 16:19:43 rmind Exp $	*/
+/*	$NetBSD: npf_nat.c,v 1.39 2014/12/30 19:11:44 christos Exp $	*/
 
 /*-
  * Copyright (c) 2014 Mindaugas Rasiukevicius <rmind at netbsd org>
@@ -71,7 +71,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: npf_nat.c,v 1.38 2014/12/20 16:19:43 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: npf_nat.c,v 1.39 2014/12/30 19:11:44 christos Exp $");
 
 #include <sys/param.h>
 #include <sys/types.h>
@@ -256,6 +256,7 @@ npf_nat_newpolicy(prop_dictionary_t natd
 	}
 	return np;
 err:
+	mutex_destroy(&np->n_lock);
 	kmem_free(np, sizeof(npf_natpolicy_t));
 	return NULL;
 }

Reply via email to