[GFS2] Plug an unlikely leak

Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
This commit is contained in:
Bob Peterson 2008-01-28 16:35:13 -06:00 committed by Steven Whitehouse
parent 048786f1e6
commit 3ad62e87cd
1 changed files with 3 additions and 1 deletions

View File

@ -404,8 +404,10 @@ static int revoke_lo_scan_elements(struct gfs2_jdesc *jd, unsigned int start,
blkno = be64_to_cpu(*(__be64 *)(bh->b_data + offset));
error = gfs2_revoke_add(sdp, blkno, start);
if (error < 0)
if (error < 0) {
brelse(bh);
return error;
}
else if (error)
sdp->sd_found_revokes++;