Source-Changes-HG archive

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

[src/trunk]: src/sys/ufs/chfs fix buf leak. Reported by:



details:   https://anonhg.NetBSD.org/src/rev/561be0010855
branches:  trunk
changeset: 336021:561be0010855
user:      christos <christos%NetBSD.org@localhost>
date:      Sat Feb 07 04:19:52 2015 +0000

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

diffstat:

 sys/ufs/chfs/chfs_scan.c |  3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diffs (17 lines):

diff -r 350c52dbac5c -r 561be0010855 sys/ufs/chfs/chfs_scan.c
--- a/sys/ufs/chfs/chfs_scan.c  Sat Feb 07 04:18:03 2015 +0000
+++ b/sys/ufs/chfs/chfs_scan.c  Sat Feb 07 04:19:52 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: chfs_scan.c,v 1.5 2014/09/01 16:27:38 he Exp $ */
+/*     $NetBSD: chfs_scan.c,v 1.6 2015/02/07 04:19:52 christos Exp $   */
 
 /*-
  * Copyright (c) 2010 Department of Software Engineering,
@@ -461,6 +461,7 @@
                        read_free += CHFS_NODE_HDR_SIZE;
                        if (read_free >= MAX_READ_FREE(chmp)) {
                                dbg("rest of the block is free. Size: %d\n", cheb->free_size);
+                               kmem_free(buf, CHFS_MAX_NODE_SIZE);
                                return chfs_scan_classify_cheb(chmp, cheb);
                        }
                        ofs += CHFS_NODE_HDR_SIZE;



Home | Main Index | Thread Index | Old Index