mirror of https://gitee.com/openkylin/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.
This commit is contained in:
parent
7550bc66f7
commit
ba226d334a
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue