cryptospore / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone

Blame SOURCES/kvm-Set-xbzrle-buffers-to-NULL-after-freeing-them-to-avo.patch

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