public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Chen Gang <gang.chen@asianux.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Eric Paris <eparis@redhat.com>, Al Viro <viro@zeniv.linux.org.uk>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: [PATCH kernel-next] kernel/audit_tree.c: fix the original version merging issue for put_tree().
Date: Mon, 06 May 2013 15:41:10 +0800	[thread overview]
Message-ID: <51875E96.30205@asianux.com> (raw)
In-Reply-To: <20130422160409.471f6208099a972d26c29fb9@linux-foundation.org>


During version merging, added another redundant put_tree().

The related original patch: 1b4f5c2 kernel/audit_tree.c: tree will leak
memory when failure occurs in audit_trim_trees().

So need delete it, or it will cause issue.


Signed-off-by: Chen Gang <gang.chen@asianux.com>
---
 kernel/audit_tree.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/kernel/audit_tree.c b/kernel/audit_tree.c
index 9fd17f0..a291aa2 100644
--- a/kernel/audit_tree.c
+++ b/kernel/audit_tree.c
@@ -621,7 +621,6 @@ void audit_trim_trees(void)
 skip_it:
 		put_tree(tree);
 		mutex_lock(&audit_filter_mutex);
-		put_tree(tree);
 	}
 	list_del(&cursor);
 	mutex_unlock(&audit_filter_mutex);
-- 
1.7.7.6

  parent reply	other threads:[~2013-05-06  7:42 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-19  9:39 [PATCH] kernel/audit_tree.c: tree will memory leak when failure occurs for audit_trim_trees() Chen Gang
2013-04-22 23:04 ` Andrew Morton
2013-04-23  1:46   ` Chen Gang
2013-05-06  7:41   ` Chen Gang [this message]
2013-05-09 12:53   ` [PATCH v2] kernel: audit_tree: resource management: need put_tree and goto Err when failure occures Chen Gang
2013-05-09 20:11     ` Andrew Morton
2013-05-10  2:08       ` Chen Gang
2013-05-10  9:50         ` Chen Gang
2013-05-10 11:29           ` Chen Gang
2013-05-13  2:54             ` Chen Gang

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=51875E96.30205@asianux.com \
    --to=gang.chen@asianux.com \
    --cc=akpm@linux-foundation.org \
    --cc=eparis@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /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