fix buf leak. Reported by:
http://www.m00nbsd.net/ae123a9bae03f7dde5c6d654412daf5a.html#Report-4
This commit is contained in:
parent
aa2ab5b195
commit
cc74afd952
|
@ -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 @@ chfs_scan_eraseblock(struct chfs_mount *chmp,
|
|||
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;
|
||||
|
|
Loading…
Reference in New Issue