Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/fs/udf fix udf_node leak. Reported by:



details:   https://anonhg.NetBSD.org/src/rev/57fc9896e2ae
branches:  trunk
changeset: 806162:57fc9896e2ae
user:      christos <christos%NetBSD.org@localhost>
date:      Sat Feb 07 04:18:03 2015 +0000

description:
fix udf_node leak. Reported by:
http://www.m00nbsd.net/ae123a9bae03f7dde5c6d654412daf5a.html#Report-4

diffstat:

 sys/fs/udf/udf_subr.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (29 lines):

diff -r 52558facdde9 -r 57fc9896e2ae sys/fs/udf/udf_subr.c
--- a/sys/fs/udf/udf_subr.c     Sat Feb 07 04:13:26 2015 +0000
+++ b/sys/fs/udf/udf_subr.c     Sat Feb 07 04:18:03 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: udf_subr.c,v 1.127 2014/09/17 21:18:43 reinoud Exp $ */
+/* $NetBSD: udf_subr.c,v 1.128 2015/02/07 04:18:03 christos Exp $ */
 
 /*
  * Copyright (c) 2006, 2008 Reinoud Zandijk
@@ -29,7 +29,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__KERNEL_RCSID(0, "$NetBSD: udf_subr.c,v 1.127 2014/09/17 21:18:43 reinoud Exp $");
+__KERNEL_RCSID(0, "$NetBSD: udf_subr.c,v 1.128 2015/02/07 04:18:03 christos Exp $");
 #endif /* not lint */
 
 
@@ -5335,8 +5335,9 @@
 
        /* always return locked vnode */
        if ((error = vn_lock(nvp, LK_EXCLUSIVE | LK_RETRY))) {
-               /* recycle vnode and unlock; simultanious will fail too */
+               /* recycle vnode and unlock; simultaneous will fail too */
                ungetnewvnode(nvp);
+               pool_put(&udf_node_pool, udf_node);
                mutex_exit(&ump->get_node_lock);
                return error;
        }



Home | Main Index | Thread Index | Old Index