Re: [PATCH] xfs: fix memory leak in xlog_recover_add_to_trans

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 09/30/13 17:53, Ben Myers wrote:
On Fri, Sep 27, 2013 at 09:00:55AM -0500, tinguely@xxxxxxx wrote:
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@xxxxxxx>

Applied.



Index: b/fs/xfs/xfs_log_recover.c
===================================================================
--- a/fs/xfs/xfs_log_recover.c
+++ b/fs/xfs/xfs_log_recover.c
@@ -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);

Sigh. I am a big fat, dunce-hatted, dork. This is the xfsprogs patch. The kernel needs kmem_free().

Please pull the patch. I will redo the whole thing to also make sure the list is removed on error.

--Mark.

_______________________________________________
xfs mailing list
xfs@xxxxxxxxxxx
http://oss.sgi.com/mailman/listinfo/xfs




[Index of Archives]     [Linux XFS Devel]     [Linux Filesystem Development]     [Filesystem Testing]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux