From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50976) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W6HtC-0005uR-3i for qemu-devel@nongnu.org; Thu, 23 Jan 2014 05:52:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W6Ht7-0003Og-9S for qemu-devel@nongnu.org; Thu, 23 Jan 2014 05:52:02 -0500 Received: from mx1.redhat.com ([209.132.183.28]:33119) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W6Ht7-0003OA-1R for qemu-devel@nongnu.org; Thu, 23 Jan 2014 05:51:57 -0500 Date: Thu, 23 Jan 2014 11:51:46 +0100 From: Kevin Wolf Message-ID: <20140123105146.GD8474@dhcp-200-207.str.redhat.com> References: <52E0CBD4.5090306@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <52E0CBD4.5090306@huawei.com> Subject: Re: [Qemu-devel] [PATCH v2] drive mirror:fix memory leak List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Zhang Min Cc: Fam Zheng , "Wangting (Kathy)" , Stefan Hajnoczi , qemu-devel , Qinling , "Chentao (Boby)" , Paolo Bonzini , "Wubin (H)" Am 23.01.2014 um 08:59 hat Zhang Min geschrieben: > > In the function mirror_iteration() -> qemu_iovec_init(), > it allocates memory for op->qiov.iov, when the write request calls back, > but in the function mirror_iteration_done(), it only frees the op, > not free the op->qiov.iov, so this causes memory leak. > > It should use qemu_iovec_destroy() to free op->qiov. > > Signed-off-by: Zhang Min Thanks, applied to the block branch. Kevin