From: tinguely@sgi.com Date: Fri, 27 Sep 2013 14:00:55 +0000 (-0500) Subject: xfs: fix memory leak in xlog_recover_add_to_trans X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=9b3b77fe661875f19ed748b67fb1eeb57d602b7e;p=openwrt%2Fstaging%2Fblogic.git xfs: fix memory leak in xlog_recover_add_to_trans Free the memory in error path of xlog_recover_add_to_trans(). Normally this memory is freed in recovery pass2, but is leaked in the error path. Signed-off-by: Mark Tinguely Reviewed-by: Eric Sandeen Signed-off-by: Ben Myers (cherry picked from commit 519ccb81ac1c8e3e4eed294acf93be00b43dcad6) --- diff --git a/fs/xfs/xfs_log_recover.c b/fs/xfs/xfs_log_recover.c index cc179878fe41..43240583fd5b 100644 --- a/fs/xfs/xfs_log_recover.c +++ b/fs/xfs/xfs_log_recover.c @@ -1585,6 +1585,7 @@ xlog_recover_add_to_trans( "bad number of regions (%d) in inode log format", in_f->ilf_size); ASSERT(0); + free(ptr); return XFS_ERROR(EIO); }