From patchwork Wed Oct 5 08:47:58 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Hajnoczi X-Patchwork-Id: 117774 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 3DC74B6F8B for ; Wed, 5 Oct 2011 19:49:01 +1100 (EST) Received: from localhost ([::1]:55029 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RBN9o-000433-67 for incoming@patchwork.ozlabs.org; Wed, 05 Oct 2011 04:48:52 -0400 Received: from eggs.gnu.org ([140.186.70.92]:48451) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RBN9B-0002KL-EE for qemu-devel@nongnu.org; Wed, 05 Oct 2011 04:48:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RBN9A-000388-2i for qemu-devel@nongnu.org; Wed, 05 Oct 2011 04:48:13 -0400 Received: from mtagate1.uk.ibm.com ([194.196.100.161]:34956) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RBN99-000382-Rk for qemu-devel@nongnu.org; Wed, 05 Oct 2011 04:48:12 -0400 Received: from d06nrmr1707.portsmouth.uk.ibm.com (d06nrmr1707.portsmouth.uk.ibm.com [9.149.39.225]) by mtagate1.uk.ibm.com (8.13.1/8.13.1) with ESMTP id p958mBHT032316 for ; Wed, 5 Oct 2011 08:48:11 GMT Received: from d06av06.portsmouth.uk.ibm.com (d06av06.portsmouth.uk.ibm.com [9.149.37.217]) by d06nrmr1707.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p958mBu21695860 for ; Wed, 5 Oct 2011 09:48:11 +0100 Received: from d06av06.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av06.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p95FmAms010452 for ; Wed, 5 Oct 2011 09:48:11 -0600 Received: from localhost (sig-9-146-224-147.de.ibm.com [9.146.224.147]) by d06av06.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id p95FmAuB010427; Wed, 5 Oct 2011 09:48:10 -0600 From: Stefan Hajnoczi To: Date: Wed, 5 Oct 2011 09:47:58 +0100 Message-Id: <1317804479-5876-7-git-send-email-stefanha@linux.vnet.ibm.com> X-Mailer: git-send-email 1.7.6.3 In-Reply-To: <1317804479-5876-1-git-send-email-stefanha@linux.vnet.ibm.com> References: <1317804479-5876-1-git-send-email-stefanha@linux.vnet.ibm.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Received-From: 194.196.100.161 Cc: Stefan Weil , Anthony Liguori , Stefan Hajnoczi Subject: [Qemu-devel] [PATCH 6/7] Fix mismatching allocation and deallocation X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Stefan Weil This error was reported by cppcheck. Signed-off-by: Stefan Weil Signed-off-by: Stefan Hajnoczi --- console.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/console.c b/console.c index 6dfcc47..e43de92 100644 --- a/console.c +++ b/console.c @@ -1538,7 +1538,7 @@ int text_console_init(QemuOpts *opts, CharDriverState **_chr) } if (!s) { - free(chr); + g_free(chr); return -EBUSY; }