From patchwork Wed Apr 21 19:35:45 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Hajnoczi X-Patchwork-Id: 93935 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o3LJZH69011971 for ; Wed, 21 Apr 2010 19:35:18 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755660Ab0DUTfO (ORCPT ); Wed, 21 Apr 2010 15:35:14 -0400 Received: from mtagate3.de.ibm.com ([195.212.17.163]:60484 "EHLO mtagate3.de.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755503Ab0DUTfN (ORCPT ); Wed, 21 Apr 2010 15:35:13 -0400 Received: from d12nrmr1607.megacenter.de.ibm.com (d12nrmr1607.megacenter.de.ibm.com [9.149.167.49]) by mtagate3.de.ibm.com (8.13.1/8.13.1) with ESMTP id o3LJZCJd010035 for ; Wed, 21 Apr 2010 19:35:12 GMT Received: from d12av02.megacenter.de.ibm.com (d12av02.megacenter.de.ibm.com [9.149.165.228]) by d12nrmr1607.megacenter.de.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id o3LJZBHa1302572 for ; Wed, 21 Apr 2010 21:35:11 +0200 Received: from d12av02.megacenter.de.ibm.com (loopback [127.0.0.1]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id o3LJZAsC012346 for ; Wed, 21 Apr 2010 21:35:11 +0200 Received: from localhost.localdomain (sig-9-145-133-64.de.ibm.com [9.145.133.64]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.12.11) with ESMTP id o3LJZAVj012058; Wed, 21 Apr 2010 21:35:10 +0200 From: Stefan Hajnoczi To: qemu-devel@nongnu.org Cc: Aurelien Jarno , kvm@vger.kernel.org, Avi Kivity , Marcelo Tosatti , Anthony Liguori , Leszek Urbanski , Stefan Hajnoczi Subject: [PATCH][STABLE] block: Free iovec arrays allocated by multiwrite_merge() Date: Wed, 21 Apr 2010 20:35:45 +0100 Message-Id: <1271878545-5965-1-git-send-email-stefanha@linux.vnet.ibm.com> X-Mailer: git-send-email 1.7.0 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Wed, 21 Apr 2010 19:35:18 +0000 (UTC) diff --git a/block.c b/block.c index 0881c93..99dd0f3 100644 --- a/block.c +++ b/block.c @@ -1731,6 +1731,9 @@ static void multiwrite_user_cb(MultiwriteCB *mcb) for (i = 0; i < mcb->num_callbacks; i++) { mcb->callbacks[i].cb(mcb->callbacks[i].opaque, mcb->error); + if (mcb->callbacks[i].free_qiov) { + qemu_iovec_destroy(mcb->callbacks[i].free_qiov); + } qemu_free(mcb->callbacks[i].free_qiov); qemu_vfree(mcb->callbacks[i].free_buf); }