From ba226d334acbc49f6751b430e0c4e00f69eef6bf Mon Sep 17 00:00:00 2001 From: Peter Krempa Date: Fri, 27 Jul 2012 14:50:54 +0200 Subject: [PATCH] conf: Remove callback from stream when freeing entries in console hash When a domain has a active console connection and is destroyed the callback is called on private data that no longer exist causing a segfault. --- src/conf/virconsole.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/conf/virconsole.c b/src/conf/virconsole.c index 3d120116ab..912aff6224 100644 --- a/src/conf/virconsole.c +++ b/src/conf/virconsole.c @@ -219,6 +219,9 @@ static void virConsoleHashEntryFree(void *data, const char *pty = name; virStreamPtr st = data; + /* remove callback from stream */ + virFDStreamSetInternalCloseCb(st, NULL, NULL, NULL); + /* free stream reference */ virStreamFree(st); -- GitLab