Date: Sat, 28 Feb 2015 22:24:46 +0000 (UTC) From: Alexander Kabaev <kan@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r279412 - head/sys/fs/nandfs Message-ID: <201502282224.t1SMOkbQ024962@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201502282224.t1SMOkbQ024962>