From: Eric Sandeen Date: Thu, 1 Aug 2013 01:33:47 +0000 (-0500) Subject: xfs:free bp in xlog_find_tail() error path X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=050a1952c3f9304eccddc4f084e2401b5205ff55;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git xfs:free bp in xlog_find_tail() error path xlog_find_tail() currently leaks a bp on one error path. There is no error target, so manually free the bp before returning the error. Found by Coverity. Signed-off-by: Eric Sandeen Reviewed-by: Mark Tinguely Signed-off-by: Ben Myers --- diff --git a/fs/xfs/xfs_log_recover.c b/fs/xfs/xfs_log_recover.c index 46710d94c649..07bc28466fb2 100644 --- a/fs/xfs/xfs_log_recover.c +++ b/fs/xfs/xfs_log_recover.c @@ -964,6 +964,7 @@ xlog_find_tail( } if (!found) { xfs_warn(log->l_mp, "%s: couldn't find sync record", __func__); + xlog_put_bp(bp); ASSERT(0); return XFS_ERROR(EIO); }