From f6c6483b259a2395ee44cfa966f622e0f2dbe2ae Mon Sep 17 00:00:00 2001 From: Orit Wasserman Date: Thu, 30 Jan 2014 20:08:33 +0200 Subject: Set xbzrle buffers to NULL after freeing them to avoid double free errors 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 77912e7a7d..66f5e82263 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; } } -- cgit v1.2.3