From: jeremie.galarneau@efficios.com (Jérémie Galarneau)
Subject: [lttng-dev] [PATCH lttng-tools] Fix: Double free in utils_partial_realpath error path
Date: Wed, 18 May 2016 16:08:03 -0400 [thread overview]
Message-ID: <CA+jJMxvxMHNNjVG9-CA5REjDU6-rfEALySSzX_qkTB1u=YRykg@mail.gmail.com> (raw)
In-Reply-To: <1463588247-28885-1-git-send-email-mjeanson@efficios.com>
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 778 bytes --]
Merged, thanks!
Jérémie
On Wed, May 18, 2016 at 12:17 PM, Michael Jeanson <mjeanson at efficios.com> wrote:
> Fixes coverity #1355521
>
> Signed-off-by: Michael Jeanson <mjeanson at efficios.com>
> ---
> src/common/utils.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/src/common/utils.c b/src/common/utils.c
> index 30a5f10..901ddb0 100644
> --- a/src/common/utils.c
> +++ b/src/common/utils.c
> @@ -190,7 +190,9 @@ error:
> free(resolved_path);
> free(cut_path);
> free(try_path);
> - free(try_path_prev);
> + if (try_path_prev != try_path) {
> + free(try_path_prev);
> + }
> return NULL;
> }
>
> --
> 2.7.4
>
--
Jérémie Galarneau
EfficiOS Inc.
http://www.efficios.com
parent reply other threads:[~2016-05-18 20:08 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <1463588247-28885-1-git-send-email-mjeanson@efficios.com>]
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='CA+jJMxvxMHNNjVG9-CA5REjDU6-rfEALySSzX_qkTB1u=YRykg@mail.gmail.com' \
--to=jeremie.galarneau@efficios.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