From patchwork Tue Jan 15 16:48:29 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Hajnoczi X-Patchwork-Id: 212248 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id CA5642C008D for ; Wed, 16 Jan 2013 03:50:30 +1100 (EST) Received: from localhost ([::1]:53417 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tv9iX-0004mt-1q for incoming@patchwork.ozlabs.org; Tue, 15 Jan 2013 11:50:29 -0500 Received: from eggs.gnu.org ([208.118.235.92]:33125) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tv9hI-00031i-7m for qemu-devel@nongnu.org; Tue, 15 Jan 2013 11:49:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tv9hE-0005pt-HZ for qemu-devel@nongnu.org; Tue, 15 Jan 2013 11:49:12 -0500 Received: from mx1.redhat.com ([209.132.183.28]:64201) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tv9hE-0005p3-9J for qemu-devel@nongnu.org; Tue, 15 Jan 2013 11:49:08 -0500 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r0FGn7V1015491 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 15 Jan 2013 11:49:07 -0500 Received: from localhost (ovpn-112-16.ams2.redhat.com [10.36.112.16]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r0FGn6Bt009215; Tue, 15 Jan 2013 11:49:07 -0500 From: Stefan Hajnoczi To: Date: Tue, 15 Jan 2013 17:48:29 +0100 Message-Id: <1358268511-27061-14-git-send-email-stefanha@redhat.com> In-Reply-To: <1358268511-27061-1-git-send-email-stefanha@redhat.com> References: <1358268511-27061-1-git-send-email-stefanha@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: Anthony Liguori , Markus Armbruster , Stefan Hajnoczi Subject: [Qemu-devel] [PATCH 13/15] scsi-disk: qemu_vfree(NULL) is fine, simplify 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: Markus Armbruster Signed-off-by: Markus Armbruster Acked-by: Paolo Bonzini Reviewed-by: Kevin Wolf Signed-off-by: Stefan Hajnoczi --- hw/scsi-disk.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/hw/scsi-disk.c b/hw/scsi-disk.c index f8d7ef3..96db9a7 100644 --- a/hw/scsi-disk.c +++ b/hw/scsi-disk.c @@ -85,9 +85,7 @@ static void scsi_free_request(SCSIRequest *req) { SCSIDiskReq *r = DO_UPCAST(SCSIDiskReq, req, req); - if (r->iov.iov_base) { - qemu_vfree(r->iov.iov_base); - } + qemu_vfree(r->iov.iov_base); } /* Helper function for command completion with sense. */