Source-Changes-HG archive

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

[src/trunk]: src/sys/fs/nilfs fix devvp leak. Reported by:



details:   https://anonhg.NetBSD.org/src/rev/3d308030b6fd
branches:  trunk
changeset: 806165:3d308030b6fd
user:      christos <christos%NetBSD.org@localhost>
date:      Sat Feb 07 04:25:16 2015 +0000

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

diffstat:

 sys/fs/nilfs/nilfs_vfsops.c |  8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diffs (30 lines):

diff -r ce5c432c3b3d -r 3d308030b6fd sys/fs/nilfs/nilfs_vfsops.c
--- a/sys/fs/nilfs/nilfs_vfsops.c       Sat Feb 07 04:21:11 2015 +0000
+++ b/sys/fs/nilfs/nilfs_vfsops.c       Sat Feb 07 04:25:16 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nilfs_vfsops.c,v 1.18 2014/10/15 09:05:46 hannken Exp $ */
+/* $NetBSD: nilfs_vfsops.c,v 1.19 2015/02/07 04:25:16 christos Exp $ */
 
 /*
  * Copyright (c) 2008, 2009 Reinoud Zandijk
@@ -28,7 +28,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__KERNEL_RCSID(0, "$NetBSD: nilfs_vfsops.c,v 1.18 2014/10/15 09:05:46 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nilfs_vfsops.c,v 1.19 2015/02/07 04:25:16 christos Exp $");
 #endif /* not lint */
 
 
@@ -879,8 +879,10 @@
 #endif
 
        error = nilfs_mount_device(devvp, mp, args, &nilfsdev);
-       if (error)
+       if (error) {
+               vrele(devvp);
                return error;
+       }
 
        /*
         * Create a nilfs_mount on the specified checkpoint. Note that only



Home | Main Index | Thread Index | Old Index