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

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

 



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

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]