Author: kan Date: Sat Feb 28 22:24:45 2015 New Revision: 279412 URL: https://svnweb.freebsd.org/changeset/base/279412
Log: Do not leak 'copy' buffer if bmap_truncate_indirect fails. Reported by: Brainy Code Scanner, by Maxime Villard. MFC after: 2 weeks Modified: head/sys/fs/nandfs/bmap.c Modified: head/sys/fs/nandfs/bmap.c ============================================================================== --- head/sys/fs/nandfs/bmap.c Sat Feb 28 21:50:04 2015 (r279411) +++ head/sys/fs/nandfs/bmap.c Sat Feb 28 22:24:45 2015 (r279412) @@ -460,6 +460,7 @@ bmap_truncate_mapping(struct nandfs_node error = bmap_truncate_indirect(node, level, &left, &cleaned, ap, f, copy); if (error) { + free(copy, M_NANDFSTEMP); nandfs_error("%s: error %d when truncate " "at level %d\n", __func__, error, level); return (error); _______________________________________________ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"