qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel]  [PATCH] Avoid memory leak
@ 2015-11-26  1:30 dongxingshui
  2015-11-26  3:43 ` [Qemu-devel] [PATCH for-2.5] " Eric Blake
  2015-11-26  7:40 ` [Qemu-devel] [PATCH] " Markus Armbruster
  0 siblings, 2 replies; 5+ messages in thread
From: dongxingshui @ 2015-11-26  1:30 UTC (permalink / raw)
  To: armbru; +Cc: zhongguocheng, opensource.dxs, dongxingshui, qemu-devel

monitor.c: Avoid memory leak

When send a wrong qmp command, a memory leak occurs. Fix it.

Signed-off-by: dongxingshui <opensource.dxs@aliyun.com>
---
 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);
-- 
2.5.1.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] [PATCH for-2.5] Avoid memory leak
  2015-11-26  1:30 [Qemu-devel] [PATCH] Avoid memory leak dongxingshui
@ 2015-11-26  3:43 ` Eric Blake
  2015-11-26  8:38   ` stefano
  2015-11-26  7:40 ` [Qemu-devel] [PATCH] " Markus Armbruster
  1 sibling, 1 reply; 5+ messages in thread
From: Eric Blake @ 2015-11-26  3:43 UTC (permalink / raw)
  To: dongxingshui, armbru; +Cc: zhongguocheng, dongxingshui, qemu-devel

[-- Attachment #1: Type: text/plain, Size: 1465 bytes --]

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 <eblake@redhat.com>

> 
> Signed-off-by: dongxingshui <opensource.dxs@aliyun.com>

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 #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] [PATCH] Avoid memory leak
  2015-11-26  1:30 [Qemu-devel] [PATCH] Avoid memory leak dongxingshui
  2015-11-26  3:43 ` [Qemu-devel] [PATCH for-2.5] " Eric Blake
@ 2015-11-26  7:40 ` Markus Armbruster
  1 sibling, 0 replies; 5+ messages in thread
From: Markus Armbruster @ 2015-11-26  7:40 UTC (permalink / raw)
  To: dongxingshui; +Cc: zhongguocheng, dongxingshui, qemu-devel

dongxingshui <opensource.dxs@aliyun.com> writes:

> monitor.c: Avoid memory leak
>
> When send a wrong qmp command, a memory leak occurs. Fix it.
>
> Signed-off-by: dongxingshui <opensource.dxs@aliyun.com>

Functionally the same as
http://lists.gnu.org/archive/html/qemu-devel/2015-10/msg06862.html
Message-Id: <1446117309-15322-1-git-send-email-armbru@redhat.com>

The delay getting that merged is entirely my fault.  Thanks!

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] [PATCH for-2.5] Avoid memory leak
  2015-11-26  3:43 ` [Qemu-devel] [PATCH for-2.5] " Eric Blake
@ 2015-11-26  8:38   ` stefano
  2015-11-26  8:52     ` Markus Armbruster
  0 siblings, 1 reply; 5+ messages in thread
From: stefano @ 2015-11-26  8:38 UTC (permalink / raw)
  To: Eric Blake, armbru; +Cc: zhongguocheng, dongxingshui, qemu-devel



On 2015/11/26 11:43, Eric Blake wrote:
> 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.

Sorry! I didn't see the mailing list before. It has been fixed by Markus.

> 
> Reviewed-by: Eric Blake <eblake@redhat.com>
> 
>>
>> Signed-off-by: dongxingshui <opensource.dxs@aliyun.com>
> 
> 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:

I'm pleased to join the community.
Thank you for your suggestion, i'll change my signed-off message and use the following one.
Signed-off-by: Stefano Dong (董兴水) <opensource.dxs@aliyun.com>


> 
> 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);
>>
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] [PATCH for-2.5] Avoid memory leak
  2015-11-26  8:38   ` stefano
@ 2015-11-26  8:52     ` Markus Armbruster
  0 siblings, 0 replies; 5+ messages in thread
From: Markus Armbruster @ 2015-11-26  8:52 UTC (permalink / raw)
  To: stefano; +Cc: zhongguocheng, dongxingshui, qemu-devel

stefano <opensource.dxs@aliyun.com> writes:

> On 2015/11/26 11:43, Eric Blake wrote:
>> 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.
>
> Sorry! I didn't see the mailing list before. It has been fixed by Markus.
>
>> 
>> Reviewed-by: Eric Blake <eblake@redhat.com>
>> 
>>>
>>> Signed-off-by: dongxingshui <opensource.dxs@aliyun.com>
>> 
>> 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:
>
> I'm pleased to join the community.
> Thank you for your suggestion, i'll change my signed-off message and
> use the following one.
> Signed-off-by: Stefano Dong (董兴水) <opensource.dxs@aliyun.com>

Looks good.  Welcome!

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-11-26  8:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-26  1:30 [Qemu-devel] [PATCH] Avoid memory leak dongxingshui
2015-11-26  3:43 ` [Qemu-devel] [PATCH for-2.5] " Eric Blake
2015-11-26  8:38   ` stefano
2015-11-26  8:52     ` Markus Armbruster
2015-11-26  7:40 ` [Qemu-devel] [PATCH] " Markus Armbruster

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).