From: Petr Lautrbach <plautrba@redhat.com>
To: selinux <selinux@vger.kernel.org>
Cc: bauen1 <j2468h@googlemail.com>,
William Roberts <william.c.roberts@intel.com>
Subject: Re: [PATCH] mcstransd: fix memory leak in new_context_str
Date: Wed, 13 May 2020 17:12:02 +0200 [thread overview]
Message-ID: <20200513151202.GA184264@workstation> (raw)
In-Reply-To: <6f2dc066-1f5b-1ea8-be48-73ae2b977b44@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 853 bytes --]
On Tue, May 12, 2020 at 07:52:54PM +0200, bauen1 wrote:
> The return value of context_new needs to be free with context_free.
>
> Signed-off-by: bauen1 <j2468h@gmail.com>
> Acked-by: William Roberts <william.c.roberts@intel.com>
Applied.
> ---
> mcstrans/src/mcstrans.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/mcstrans/src/mcstrans.c b/mcstrans/src/mcstrans.c
> index 96bdbdff..2116b161 100644
> --- a/mcstrans/src/mcstrans.c
> +++ b/mcstrans/src/mcstrans.c
> @@ -919,6 +919,7 @@ new_context_str(const security_context_t incon, const char *range) {
> }
> context_range_set(con, range);
> rcon = strdup(context_str(con));
> + context_free(con);
> if (!rcon) {
> goto exit;
> }
--
() ascii ribbon campaign - against html e-mail
/\ www.asciiribbon.org - against proprietary attachments
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2020-05-13 15:12 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-12 17:52 [PATCH] mcstransd: fix memory leak in new_context_str bauen1
2020-05-12 18:03 ` Roberts, William C
2020-05-13 15:12 ` Petr Lautrbach [this message]
2020-05-13 15:52 ` William Roberts
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=20200513151202.GA184264@workstation \
--to=plautrba@redhat.com \
--cc=j2468h@googlemail.com \
--cc=selinux@vger.kernel.org \
--cc=william.c.roberts@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.