From e8cafbffc5f3363548c13cc237883a3346cff1cf Mon Sep 17 00:00:00 2001 From: Orit Wasserman Date: Tue, 11 Feb 2014 14:56:36 +0100 Subject: [PATCH 17/28] Set xbzrle buffers to NULL after freeing them to avoid double free errors RH-Author: Orit Wasserman Message-id: <1392130597-23600-2-git-send-email-owasserm@redhat.com> Patchwork-id: 57212 O-Subject: [RHEL7 qemu-kvm PATCH 1/2] Set xbzrle buffers to NULL after freeing them to avoid double free errors Bugzilla: 1038540 RH-Acked-by: Marcel Apfelbaum RH-Acked-by: Dr. David Alan Gilbert (git) RH-Acked-by: Juan Quintela Signed-off-by: Orit Wasserman Reviewed-by: Juan Quintela Reviewed-by: Eric Blake Signed-off-by: Juan Quintela (cherry picked from commit f6c6483b259a2395ee44cfa966f622e0f2dbe2ae) --- arch_init.c | 3 +++ 1 file changed, 3 insertions(+) Signed-off-by: Miroslav Rezanina --- arch_init.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/arch_init.c b/arch_init.c index 0aacdac..65148d6 100644 --- a/arch_init.c +++ b/arch_init.c @@ -623,6 +623,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; } } -- 1.7.1