summaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_log_recover.c
diff options
context:
space:
mode:
authorEric Sandeen <sandeen@redhat.com>2013-07-31 20:33:47 -0500
committerBen Myers <bpm@sgi.com>2013-08-13 15:49:51 -0500
commit050a1952c3f9304eccddc4f084e2401b5205ff55 (patch)
treee36a2c47600197b7e7d7fe12c3051f1887d55eb2 /fs/xfs/xfs_log_recover.c
parent5d0a654974c5cac03ce7c577bcfd6bca0f2b2c5a (diff)
downloadop-kernel-dev-050a1952c3f9304eccddc4f084e2401b5205ff55.zip
op-kernel-dev-050a1952c3f9304eccddc4f084e2401b5205ff55.tar.gz
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 <sandeen@redhat.com> Reviewed-by: Mark Tinguely <tinguely@sgi.com> Signed-off-by: Ben Myers <bpm@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_log_recover.c')
-rw-r--r--fs/xfs/xfs_log_recover.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/xfs/xfs_log_recover.c b/fs/xfs/xfs_log_recover.c
index 46710d9..07bc284 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);
}
OpenPOWER on IntegriCloud