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-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=ba226d334acbc49f6751b430e0c4e00f69eef6bf;p=libvirt.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. --- 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);