From c02482bdd845f306381bb998f8cf1529b3a782fc Mon Sep 17 00:00:00 2001 From: Peter Krempa Date: Fri, 3 Aug 2012 13:16:24 +0200 Subject: [PATCH] virsh: console: Avoid using stream after being freed. The stream object wasn't set to NULL after freeing causing a double free attempt on the cleanup path. (cherry picked from commit e3b8808ba764e06f68785a2bbdd8b7ab00b71fa4) --- tools/console.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/console.c b/tools/console.c index 34fde05eb7..cec874000c 100644 --- a/tools/console.c +++ b/tools/console.c @@ -101,6 +101,7 @@ virConsoleShutdown(virConsolePtr con) virStreamEventRemoveCallback(con->st); virStreamAbort(con->st); virStreamFree(con->st); + con->st = NULL; } VIR_FREE(con->streamToTerminal.data); VIR_FREE(con->terminalToStream.data); -- GitLab