mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-06 21:15:22 +00:00
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 ba226d334a
)
This commit is contained in:
parent
3883ef0360
commit
819df25518
@ -222,6 +222,9 @@ static void virConsoleHashEntryFree(void *data,
|
|||||||
const char *pty = name;
|
const char *pty = name;
|
||||||
virStreamPtr st = data;
|
virStreamPtr st = data;
|
||||||
|
|
||||||
|
/* remove callback from stream */
|
||||||
|
virFDStreamSetInternalCloseCb(st, NULL, NULL, NULL);
|
||||||
|
|
||||||
/* free stream reference */
|
/* free stream reference */
|
||||||
virStreamFree(st);
|
virStreamFree(st);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user