[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] [PATCH] virsh: console: Avoid using stream after being freed.



The stream object wasn't freed causing a double free attempt.
---
 tools/console.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/tools/console.c b/tools/console.c
index afece27..fee2ce3 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);
-- 
1.7.8.6


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]