qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH for-2.5] Avoid memory leak


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH for-2.5] Avoid memory leak
Date: Wed, 25 Nov 2015 20:43:12 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0

On 11/25/2015 06:30 PM, dongxingshui wrote:
> monitor.c: Avoid memory leak
> 
> When send a wrong qmp command, a memory leak occurs. Fix it.

Looks like the leak was introduced in 710aec9; would be worth amending
the commit message to mention that.

Reviewed-by: Eric Blake <address@hidden>

> 
> Signed-off-by: dongxingshui <address@hidden>

This looks like your first patch to qemu (at least I wasn't able to find
anything from you via 'git log') - welcome to the community.  I suspect
that 'dongxingshui' is probably your login name; it doesn't give a
Western reader like me an idea where to break into family and personal
names.  It's a bit nicer to use a 'Full Name' notation, or even to list
your name in two forms (Latin and native UTF-8 characters); see this
recent conversation:

https://lists.gnu.org/archive/html/qemu-devel/2015-11/msg05208.html

> ---
>  monitor.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/monitor.c b/monitor.c
> index e4cf34e..af6cfc5 100644
> --- a/monitor.c
> +++ b/monitor.c
> @@ -3906,6 +3906,7 @@ static void handle_qmp_command(JSONMessageParser 
> *parser, QList *tokens)
>  
>  err_out:
>      monitor_protocol_emitter(mon, data, local_err);
> +    error_free(local_err);
>      qobject_decref(data);
>      QDECREF(input);
>      QDECREF(args);
> 

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]