From e3b8808ba764e06f68785a2bbdd8b7ab00b71fa4 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. --- tools/console.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/console.c b/tools/console.c index afece274f3..fee2ce30ac 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