mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jiri Slaby <jirislaby@gmail.com>
To: "Serge E. Hallyn" <serue@us.ibm.com>
Cc: Jiri Slaby <jslaby@suse.cz>,
	jmorris@namei.org, linux-security-module@vger.kernel.org,
	linux-kernel@vger.kernel.org, David Howells <dhowells@redhat.com>
Subject: Re: [PATCH 1/1] cred: fix memory leak
Date: Wed, 06 Jan 2010 18:31:32 +0100	[thread overview]
Message-ID: <4B44C8F4.7030900@gmail.com> (raw)
In-Reply-To: <20100106172541.GB15784@us.ibm.com>

On 01/06/2010 06:25 PM, Serge E. Hallyn wrote:
> Quoting Jiri Slaby (jslaby@suse.cz):
>> Stanse found a memory leak in prepare_exec_creds. tgcred is not
>> freed/assigned on all paths. Fix that.
>>
>> I.e. unifdef tgcred and add kfree(tgcred); as it is initialized to
>> NULL already.
> 
> Does this compile with CONFIG_KEYS=n, , though? 

Yes and I guess it's due to no dereference of the pointer.

> Should this patch add one?

Hmm, I don't think so. The patch is ugly in the light of not having the
struct defined. I should come up with something where the CONFIG_KEYS is
left there.

thanks,
-- 
js

      reply	other threads:[~2010-01-06 17:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-06 17:01 Jiri Slaby
2010-01-06 17:06 ` David Howells
2010-01-06 17:25 ` Serge E. Hallyn
2010-01-06 17:31   ` Jiri Slaby [this message]

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=4B44C8F4.7030900@gmail.com \
    --to=jirislaby@gmail.com \
    --cc=dhowells@redhat.com \
    --cc=jmorris@namei.org \
    --cc=jslaby@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=serue@us.ibm.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

Powered by JetHome