From: tinguely@sgi.com
To: xfs@oss.sgi.com
Subject: [PATCH 1/2] xfsprogs: fix leak in xfs_log_recover_add_to_trans
Date: Sat, 05 Oct 2013 21:51:52 -0500 [thread overview]
Message-ID: <20131006025306.613219691@sgi.com> (raw)
In-Reply-To: 20131006025151.573856006@sgi.com
[-- Attachment #1: xfsprogs-fix-memory-leak-in-xlog_recover_add_to_trans.patch --]
[-- Type: text/plain, Size: 781 bytes --]
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>
---
Found by Coverity (134683).
libxlog/xfs_log_recover.c | 1 +
1 file changed, 1 insertion(+)
Index: b/libxlog/xfs_log_recover.c
===================================================================
--- a/libxlog/xfs_log_recover.c
+++ b/libxlog/xfs_log_recover.c
@@ -1131,6 +1131,7 @@ xlog_recover_add_to_trans(
"bad number of regions (%d) in inode log format",
in_f->ilf_size);
ASSERT(0);
+ kmem_free(ptr);
return XFS_ERROR(EIO);
}
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2013-10-06 2:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-06 2:51 [PATCH 0/2] xfsprogs misc memory leaks tinguely
2013-10-06 2:51 ` tinguely [this message]
2013-10-06 2:51 ` [PATCH 2/2] xfs: fix memory leak in xfs_dir2_node_removename tinguely
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20131006025306.613219691@sgi.com \
--to=tinguely@sgi.com \
--cc=xfs@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox