mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2025-12-31 20:04:09 +00:00
spicevmc: set state of DeviceInstance to NULL
After spice_char_device_state_destroy is called spicevmc should not keep reference to that memory. state->chardev_st and sin->st point to the same SpiceCharDeviceState and both should be set to NULL when it is destroyed.
This commit is contained in:
parent
c429574bb6
commit
08230ee171
@ -559,6 +559,7 @@ void spicevmc_device_disconnect(SpiceCharDeviceInstance *sin)
|
||||
}
|
||||
spice_char_device_state_destroy(sin->st);
|
||||
state->chardev_st = NULL;
|
||||
sin->st = NULL;
|
||||
|
||||
reds_unregister_channel(&state->channel);
|
||||
free(state->pipe_item);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user