From: Cao jin <caoj.fnst@cn.fujitsu.com>
To: <qemu-devel@nongnu.org>
Cc: qemu-trivial <qemu-trivial@nongnu.org>, mjt@tls.msk.ru
Subject: Re: [Qemu-trivial] [Qemu-devel] [PATCH] loader: fix potential memory leak
Date: Thu, 25 Feb 2016 16:09:47 +0800 [thread overview]
Message-ID: <56CEB6CB.3080600@cn.fujitsu.com> (raw)
In-Reply-To: <1456305167-19457-1-git-send-email-caoj.fnst@cn.fujitsu.com>
sorry, It just came to me that I forgot to cc qemu-trivial
On 02/24/2016 05:12 PM, Cao jin wrote:
> Signed-off-by: Cao jin <caoj.fnst@cn.fujitsu.com>
> ---
> hw/core/loader.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/hw/core/loader.c b/hw/core/loader.c
> index 3a57415..24fea65 100644
> --- a/hw/core/loader.c
> +++ b/hw/core/loader.c
> @@ -827,10 +827,16 @@ int rom_add_file(const char *file, const char *fw_dir,
> err:
> if (fd != -1)
> close(fd);
> +
> g_free(rom->data);
> g_free(rom->path);
> g_free(rom->name);
> + if (fw_dir) {
> + g_free(rom->fw_dir);
> + g_free(rom->fw_file);
> + }
> g_free(rom);
> +
> return -1;
> }
>
>
--
Yours Sincerely,
Cao jin
WARNING: multiple messages have this Message-ID (diff)
From: Cao jin <caoj.fnst@cn.fujitsu.com>
To: qemu-devel@nongnu.org
Cc: qemu-trivial <qemu-trivial@nongnu.org>, mjt@tls.msk.ru
Subject: Re: [Qemu-devel] [PATCH] loader: fix potential memory leak
Date: Thu, 25 Feb 2016 16:09:47 +0800 [thread overview]
Message-ID: <56CEB6CB.3080600@cn.fujitsu.com> (raw)
In-Reply-To: <1456305167-19457-1-git-send-email-caoj.fnst@cn.fujitsu.com>
sorry, It just came to me that I forgot to cc qemu-trivial
On 02/24/2016 05:12 PM, Cao jin wrote:
> Signed-off-by: Cao jin <caoj.fnst@cn.fujitsu.com>
> ---
> hw/core/loader.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/hw/core/loader.c b/hw/core/loader.c
> index 3a57415..24fea65 100644
> --- a/hw/core/loader.c
> +++ b/hw/core/loader.c
> @@ -827,10 +827,16 @@ int rom_add_file(const char *file, const char *fw_dir,
> err:
> if (fd != -1)
> close(fd);
> +
> g_free(rom->data);
> g_free(rom->path);
> g_free(rom->name);
> + if (fw_dir) {
> + g_free(rom->fw_dir);
> + g_free(rom->fw_file);
> + }
> g_free(rom);
> +
> return -1;
> }
>
>
--
Yours Sincerely,
Cao jin
next prev parent reply other threads:[~2016-02-25 8:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-24 9:12 [Qemu-devel] [PATCH] loader: fix potential memory leak Cao jin
2016-02-25 8:09 ` Cao jin [this message]
2016-02-25 8:09 ` Cao jin
2016-03-16 11:39 ` [Qemu-trivial] " Michael Tokarev
2016-03-16 11:39 ` [Qemu-devel] " Michael Tokarev
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=56CEB6CB.3080600@cn.fujitsu.com \
--to=caoj.fnst@cn.fujitsu.com \
--cc=mjt@tls.msk.ru \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@nongnu.org \
/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.