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:
Victor Toso 2015-11-13 10:46:43 +01:00
parent c429574bb6
commit 08230ee171

View File

@ -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);