From patchwork Thu Feb 9 13:29:42 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luiz Capitulino X-Patchwork-Id: 140378 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 AEF42B6EF1 for ; Fri, 10 Feb 2012 00:30:33 +1100 (EST) Received: from localhost ([::1]:32918 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RvU50-0005XN-FU for incoming@patchwork.ozlabs.org; Thu, 09 Feb 2012 08:30:30 -0500 Received: from eggs.gnu.org ([140.186.70.92]:43716) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RvU4j-0005OS-Ct for qemu-devel@nongnu.org; Thu, 09 Feb 2012 08:30:22 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RvU4Z-00064n-PN for qemu-devel@nongnu.org; Thu, 09 Feb 2012 08:30:09 -0500 Received: from mx1.redhat.com ([209.132.183.28]:21840) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RvU4H-0005yW-Ka; Thu, 09 Feb 2012 08:29:45 -0500 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q19DTi5P031109 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 9 Feb 2012 08:29:44 -0500 Received: from doriath.home (ovpn-116-73.ams2.redhat.com [10.36.116.73]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id q19DTgVO022080; Thu, 9 Feb 2012 08:29:43 -0500 Date: Thu, 9 Feb 2012 11:29:42 -0200 From: Luiz Capitulino To: qemu-trivial Message-ID: <20120209112942.77ce62bf@doriath.home> Organization: Red Hat Mime-Version: 1.0 X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.132.183.28 Cc: qemu-devel@nongnu.org Subject: [Qemu-devel] [TRIVIAL] virtio_cleanup(): Remove unneeded g_free() parameter check 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 Signed-off-by: Luiz Capitulino --- hw/virtio.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/hw/virtio.c b/hw/virtio.c index 74cc038..064aecf 100644 --- a/hw/virtio.c +++ b/hw/virtio.c @@ -845,8 +845,7 @@ int virtio_load(VirtIODevice *vdev, QEMUFile *f) void virtio_cleanup(VirtIODevice *vdev) { qemu_del_vm_change_state_handler(vdev->vmstate); - if (vdev->config) - g_free(vdev->config); + g_free(vdev->config); g_free(vdev->vq); g_free(vdev); }