From: Anthony Liguori <anthony@codemonkey.ws>
To: Jan Kiszka <jan.kiszka@siemens.com>
Cc: qemu-devel <qemu-devel@nongnu.org>, Gerd Hoffmann <kraxel@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] Fix tiny leak in qemu_opts_parse
Date: Mon, 03 May 2010 12:14:00 -0500 [thread overview]
Message-ID: <4BDF0458.2020700@codemonkey.ws> (raw)
In-Reply-To: <4BD9B2CB.7060107@siemens.com>
On 04/29/2010 11:24 AM, Jan Kiszka wrote:
> qemu_opts_create duplicates the id we pass in case it shall be stored in
> the opts. So we do not need to dup it in qemu_opts_parse, leaking a few
> bytes this way.
>
> Signed-off-by: Jan Kiszka<jan.kiszka@siemens.com>
>
Applied. Thanks.
Regards,
Anthony Liguori
> ---
> qemu-option.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/qemu-option.c b/qemu-option.c
> index 1ffc497..076dddf 100644
> --- a/qemu-option.c
> +++ b/qemu-option.c
> @@ -763,10 +763,10 @@ QemuOpts *qemu_opts_parse(QemuOptsList *list, const char *params,
>
> if (strncmp(params, "id=", 3) == 0) {
> get_opt_value(value, sizeof(value), params+3);
> - id = qemu_strdup(value);
> + id = value;
> } else if ((p = strstr(params, ",id=")) != NULL) {
> get_opt_value(value, sizeof(value), p+4);
> - id = qemu_strdup(value);
> + id = value;
> }
> opts = qemu_opts_create(list, id, 1);
> if (opts == NULL)
>
>
>
>
prev parent reply other threads:[~2010-05-03 17:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-29 16:24 [Qemu-devel] [PATCH] Fix tiny leak in qemu_opts_parse Jan Kiszka
2010-05-03 17:14 ` Anthony Liguori [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=4BDF0458.2020700@codemonkey.ws \
--to=anthony@codemonkey.ws \
--cc=jan.kiszka@siemens.com \
--cc=kraxel@redhat.com \
--cc=qemu-devel@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.