From: Peter Krempa Date: Fri, 27 Jul 2012 12:50:54 +0000 (+0200) Subject: conf: Remove callback from stream when freeing entries in console hash X-Git-Tag: v0.9.11.5~21 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=819df255187b1f46824f378bf3054e9496f431aa;p=thirdparty%2Flibvirt.git 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. (cherry picked from commit ba226d334acbc49f6751b430e0c4e00f69eef6bf) --- diff --git a/src/conf/virconsole.c b/src/conf/virconsole.c index 443d80d44a..e665149470 100644 --- a/src/conf/virconsole.c +++ b/src/conf/virconsole.c @@ -222,6 +222,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);