qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Anthony Liguori <anthony@codemonkey.ws>
To: Luiz Capitulino <lcapitulino@redhat.com>
Cc: aliguori@us.ibm.com, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] QMP: Don't free async event's 'data'
Date: Tue, 12 Jan 2010 13:35:18 -0600	[thread overview]
Message-ID: <4B4CCEF6.9000907@codemonkey.ws> (raw)
In-Reply-To: <20100108164553.0ad0fb5d@doriath>

On 01/08/2010 12:45 PM, Luiz Capitulino wrote:
> The monitor_protocol_event() function will free the
> event's data, this is wrong as 'data' management is up
> to the caller.
>
> Signed-off-by: Luiz Capitulino<lcapitulino@redhat.com>
>    

Applied.  Thanks.

Regards,

Anthony Liguori

> ---
>   monitor.c |    4 +++-
>   1 files changed, 3 insertions(+), 1 deletions(-)
>
> diff --git a/monitor.c b/monitor.c
> index 3af1d5c..2403a97 100644
> --- a/monitor.c
> +++ b/monitor.c
> @@ -365,8 +365,10 @@ void monitor_protocol_event(MonitorEvent event, QObject *data)
>       qmp = qdict_new();
>       timestamp_put(qmp);
>       qdict_put(qmp, "event", qstring_from_str(event_name));
> -    if (data)
> +    if (data) {
> +        qobject_incref(data);
>           qdict_put_obj(qmp, "data", data);
> +    }
>
>       monitor_json_emitter(mon, QOBJECT(qmp));
>       QDECREF(qmp);
>    

      reply	other threads:[~2010-01-12 19:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-08 18:45 [Qemu-devel] [PATCH] QMP: Don't free async event's 'data' Luiz Capitulino
2010-01-12 19:35 ` 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=4B4CCEF6.9000907@codemonkey.ws \
    --to=anthony@codemonkey.ws \
    --cc=aliguori@us.ibm.com \
    --cc=lcapitulino@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).