Skip to content

Commit

Permalink
xfs: fix memory leak in xlog_recover_add_to_trans
Browse files Browse the repository at this point in the history
Free the memory in error path of xlog_recover_add_to_trans().
Normally this memory is freed in recovery pass2, but is leaked
in the error path.

Signed-off-by: Mark Tinguely <tinguely@sgi.com>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Ben Myers <bpm@sgi.com>

(cherry picked from commit 519ccb8)
  • Loading branch information
tinguely@sgi.com authored and Ben Myers committed Oct 4, 2013
1 parent 6d31349 commit 9b3b77f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions fs/xfs/xfs_log_recover.c
Original file line number Diff line number Diff line change
Expand Up @@ -1585,6 +1585,7 @@ xlog_recover_add_to_trans(
"bad number of regions (%d) in inode log format",
in_f->ilf_size);
ASSERT(0);
free(ptr);
return XFS_ERROR(EIO);
}

Expand Down

0 comments on commit 9b3b77f

Please sign in to comment.