Received: from eggs.gnu.org ([2001:4830:134:3::10]:54162) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YLjJ7-0005xV-WE for qemu-devel@nongnu.org; Wed, 11 Feb 2015 21:15:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YLjJ7-00044Y-8C for qemu-devel@nongnu.org; Wed, 11 Feb 2015 21:15:09 -0500 Message-ID: <54DC0C9B.40505@huawei.com> Date: Thu, 12 Feb 2015 10:14:51 +0800 From: Gonglei MIME-Version: 1.0 References: <1423673410-15100-1-git-send-email-kraxel@redhat.com> In-Reply-To: <1423673410-15100-1-git-send-email-kraxel@redhat.com> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2] spice: fix memory leak List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann , qemu-devel@nongnu.org Cc: qemu-trivial@nongnu.org, pbonzini@redhat.com, Luiz Capitulino On 2015/2/12 0:50, Gerd Hoffmann wrote: > Found by coverity. > > Signed-off-by: Gerd Hoffmann > Reviewed-by: Paolo Bonzini > --- > monitor.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/monitor.c b/monitor.c > index c3cc060..2c37953 100644 > --- a/monitor.c > +++ b/monitor.c > @@ -1101,6 +1101,7 @@ static int client_migrate_info(Monitor *mon, const QDict *qdict, > if (strcmp(protocol, "spice") == 0) { > if (!qemu_using_spice(&err)) { > qerror_report_err(err); > + error_free(err); > return -1; > } > > Hi, Gerd the err variable should be initialized to NULL. This leak had been fixed by: http://patchwork.ozlabs.org/patch/438696/ and v2: [PATCH v2] monitor: Fix missing err = NULL in client_migrate_info() Regards, -Gonglei