From: Eric Sandeen Date: Thu, 1 Aug 2013 01:33:47 +0000 (+0000) Subject: xfsprogs:free bp in xlog_find_tail() error path X-Git-Tag: v3.2.0-alpha1~67 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=dc93954aa6f13963bcc87fc00ce55a4745dc7b93;p=thirdparty%2Fxfsprogs-dev.git xfsprogs: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 --- diff --git a/libxlog/xfs_log_recover.c b/libxlog/xfs_log_recover.c index 4093ddcf4..939498859 100644 --- a/libxlog/xfs_log_recover.c +++ b/libxlog/xfs_log_recover.c @@ -756,6 +756,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); }