From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35500) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a1s5q-0000t7-Tx for qemu-devel@nongnu.org; Thu, 26 Nov 2015 03:39:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a1s5m-0002Ug-JV for qemu-devel@nongnu.org; Thu, 26 Nov 2015 03:39:54 -0500 Received: from smtpcm9-309.freemail.mail.aliyun.com ([110.75.46.9]:55099) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a1s5k-0002P7-62 for qemu-devel@nongnu.org; Thu, 26 Nov 2015 03:39:50 -0500 References: <1448501448-5652-1-git-send-email-opensource.dxs@aliyun.com> <56567FD0.2040105@redhat.com> From: stefano Message-ID: <5656C51D.8070005@aliyun.com> Date: Thu, 26 Nov 2015 16:38:53 +0800 MIME-Version: 1.0 In-Reply-To: <56567FD0.2040105@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH for-2.5] Avoid memory leak List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake , armbru@redhat.com Cc: zhongguocheng@huawei.com, dongxingshui@huawei.com, qemu-devel@nongnu.org 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 > >> >> Signed-off-by: dongxingshui > > 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 (董兴水) > > 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); >> >