]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfsprogs:free bp in xlog_find_tail() error path
authorEric Sandeen <sandeen@redhat.com>
Thu, 1 Aug 2013 01:33:47 +0000 (01:33 +0000)
committerMark Tinguely <tinguely@eagdhcp-232-140.americas.sgi.com>
Fri, 9 Aug 2013 13:23:47 +0000 (08:23 -0500)
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>
libxlog/xfs_log_recover.c

index 4093ddcf4636564456ec848ea79bdcf060644e60..9394988595c33eeac9855b4ceeda5e3ce99353f1 100644 (file)
@@ -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);
        }