From: dongxingshui <opensource.dxs@aliyun.com>
To: armbru@redhat.com
Cc: zhongguocheng@huawei.com, opensource.dxs@aliyun.com,
dongxingshui@huawei.com, qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH] Avoid memory leak
Date: Thu, 26 Nov 2015 01:30:48 +0000 [thread overview]
Message-ID: <1448501448-5652-1-git-send-email-opensource.dxs@aliyun.com> (raw)
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
next reply other threads:[~2015-11-26 1:31 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-26 1:30 dongxingshui [this message]
2015-11-26 3:43 ` [Qemu-devel] [PATCH for-2.5] Avoid memory leak 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
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=1448501448-5652-1-git-send-email-opensource.dxs@aliyun.com \
--to=opensource.dxs@aliyun.com \
--cc=armbru@redhat.com \
--cc=dongxingshui@huawei.com \
--cc=qemu-devel@nongnu.org \
--cc=zhongguocheng@huawei.com \
/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).