From: Amos Kong <akong@redhat.com>
To: Eduardo Habkost <ehabkost@redhat.com>
Cc: "Michael Roth" <mdroth@linux.vnet.ibm.com>,
"Marcel Apfelbaum" <marcel.a@redhat.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
"Markus Armbruster" <armbru@redhat.com>,
qemu-devel@nongnu.org, "Andreas Färber" <afaerber@suse.de>
Subject: Re: [Qemu-devel] [PATCH RESEND 2/2] hw/machine: Free old values of string properties
Date: Thu, 7 Aug 2014 10:24:48 +0800 [thread overview]
Message-ID: <20140807022448.GC8109@z.redhat.com> (raw)
In-Reply-To: <1407349101-27793-3-git-send-email-ehabkost@redhat.com>
On Wed, Aug 06, 2014 at 03:18:21PM -0300, Eduardo Habkost wrote:
> Reviewed-by: Markus Armbruster <armbru@redhat.com>
> Reviewed-by: Marcel Apfelbaum <marcel.a@redhat.com>
> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Amos Kong <akong@redhat.com>
> ---
> hw/core/machine.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/hw/core/machine.c b/hw/core/machine.c
> index 7a66c57..d145aca 100644
> --- a/hw/core/machine.c
> +++ b/hw/core/machine.c
> @@ -24,6 +24,7 @@ static void machine_set_accel(Object *obj, const char *value, Error **errp)
> {
> MachineState *ms = MACHINE(obj);
>
> + g_free(ms->accel);
> ms->accel = g_strdup(value);
> }
>
> @@ -79,6 +80,7 @@ static void machine_set_kernel(Object *obj, const char *value, Error **errp)
> {
> MachineState *ms = MACHINE(obj);
>
> + g_free(ms->kernel_filename);
> ms->kernel_filename = g_strdup(value);
> }
>
> @@ -93,6 +95,7 @@ static void machine_set_initrd(Object *obj, const char *value, Error **errp)
> {
> MachineState *ms = MACHINE(obj);
>
> + g_free(ms->initrd_filename);
> ms->initrd_filename = g_strdup(value);
> }
>
> @@ -107,6 +110,7 @@ static void machine_set_append(Object *obj, const char *value, Error **errp)
> {
> MachineState *ms = MACHINE(obj);
>
> + g_free(ms->kernel_cmdline);
> ms->kernel_cmdline = g_strdup(value);
> }
>
> @@ -121,6 +125,7 @@ static void machine_set_dtb(Object *obj, const char *value, Error **errp)
> {
> MachineState *ms = MACHINE(obj);
>
> + g_free(ms->dtb);
> ms->dtb = g_strdup(value);
> }
>
> @@ -135,6 +140,7 @@ static void machine_set_dumpdtb(Object *obj, const char *value, Error **errp)
> {
> MachineState *ms = MACHINE(obj);
>
> + g_free(ms->dumpdtb);
> ms->dumpdtb = g_strdup(value);
> }
>
> @@ -176,6 +182,7 @@ static void machine_set_dt_compatible(Object *obj, const char *value, Error **er
> {
> MachineState *ms = MACHINE(obj);
>
> + g_free(ms->dt_compatible);
> ms->dt_compatible = g_strdup(value);
> }
>
> @@ -232,6 +239,7 @@ static void machine_set_firmware(Object *obj, const char *value, Error **errp)
> {
> MachineState *ms = MACHINE(obj);
>
> + g_free(ms->firmware);
> ms->firmware = g_strdup(value);
> }
>
> --
> 1.9.3
>
--
Amos.
next prev parent reply other threads:[~2014-08-07 2:25 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-06 18:18 [Qemu-devel] [PATCH RESEND 0/2] Fix leaks on object_property_add_str() setters Eduardo Habkost
2014-08-06 18:18 ` [Qemu-devel] [PATCH RESEND 1/2] rng-egd: Free old chr_name value before setting new one Eduardo Habkost
2014-08-07 2:24 ` Amos Kong
2014-08-07 10:18 ` Paolo Bonzini
2014-08-25 15:59 ` Amos Kong
2014-08-06 18:18 ` [Qemu-devel] [PATCH RESEND 2/2] hw/machine: Free old values of string properties Eduardo Habkost
2014-08-07 2:24 ` Amos Kong [this message]
2014-09-04 15:25 ` Michael S. Tsirkin
2014-08-22 19:35 ` [Qemu-devel] [PATCH RESEND 0/2] Fix leaks on object_property_add_str() setters Eduardo Habkost
2014-08-24 11:16 ` Michael S. Tsirkin
2014-08-25 11:44 ` Paolo Bonzini
2014-09-04 15:08 ` Eduardo Habkost
2014-09-04 15:29 ` Michael S. Tsirkin
2014-09-04 15:31 ` Michael S. Tsirkin
2014-09-04 15:34 ` Eduardo Habkost
2014-09-04 16:11 ` Michael S. Tsirkin
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=20140807022448.GC8109@z.redhat.com \
--to=akong@redhat.com \
--cc=afaerber@suse.de \
--cc=armbru@redhat.com \
--cc=ehabkost@redhat.com \
--cc=marcel.a@redhat.com \
--cc=mdroth@linux.vnet.ibm.com \
--cc=mst@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).