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

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