Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

xfs: fix memory leak in xlog_recover_add_to_trans

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>

authored by

tinguely@sgi.com and committed by
Ben Myers
519ccb81 367993e7

+1
+1
fs/xfs/xfs_log_recover.c
··· 1585 1585 "bad number of regions (%d) in inode log format", 1586 1586 in_f->ilf_size); 1587 1587 ASSERT(0); 1588 + free(ptr); 1588 1589 return XFS_ERROR(EIO); 1589 1590 } 1590 1591