From patchwork Tue Feb 4 15:55:29 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Juan Quintela X-Patchwork-Id: 316743 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 77A532C0082 for ; Wed, 5 Feb 2014 06:53:09 +1100 (EST) Received: from localhost ([::1]:53991 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WAkqW-0004Zg-2N for incoming@patchwork.ozlabs.org; Tue, 04 Feb 2014 13:35:44 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54068) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WAkpx-0004Ky-JT for qemu-devel@nongnu.org; Tue, 04 Feb 2014 13:35:15 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WAkpr-0000da-LD for qemu-devel@nongnu.org; Tue, 04 Feb 2014 13:35:09 -0500 Received: from mx1.redhat.com ([209.132.183.28]:52579) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WAiLh-0002tH-Gj for qemu-devel@nongnu.org; Tue, 04 Feb 2014 10:55: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 s14Ftguh006923 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 4 Feb 2014 10:55:42 -0500 Received: from trasno.mitica (ovpn-113-124.phx2.redhat.com [10.3.113.124]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id s14FtYaC020346; Tue, 4 Feb 2014 10:55:40 -0500 From: Juan Quintela To: qemu-devel@nongnu.org Date: Tue, 4 Feb 2014 16:55:29 +0100 Message-Id: <1391529334-30526-4-git-send-email-quintela@redhat.com> In-Reply-To: <1391529334-30526-1-git-send-email-quintela@redhat.com> References: <1391529334-30526-1-git-send-email-quintela@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: peter.maydell@linaro.org, anthony@codemonkey.ws, Orit Wasserman Subject: [Qemu-devel] [PATCH 3/8] Set xbzrle buffers to NULL after freeing them to avoid double free errors 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: Orit Wasserman Signed-off-by: Orit Wasserman Reviewed-by: Juan Quintela Reviewed-by: Eric Blake Signed-off-by: Juan Quintela --- arch_init.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch_init.c b/arch_init.c index 77912e7..66f5e82 100644 --- a/arch_init.c +++ b/arch_init.c @@ -617,6 +617,9 @@ static void migration_end(void) g_free(XBZRLE.current_buf); g_free(XBZRLE.decoded_buf); XBZRLE.cache = NULL; + XBZRLE.encoded_buf = NULL; + XBZRLE.current_buf = NULL; + XBZRLE.decoded_buf = NULL; } }