yeahuh / 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

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