[Spice-devel] [PATCH spice-server 2/7] char_device.c: when the state is destroyed, also free the buffer that is being written to the device

Hans de Goede hdegoede at redhat.com
Thu Nov 22 01:58:59 PST 2012


Hi,

Looks good, ACK.

Regards,

Hans


On 11/21/2012 08:42 PM, Yonit Halperin wrote:
> ---
>   server/char_device.c | 3 +++
>   1 file changed, 3 insertions(+)
>
> diff --git a/server/char_device.c b/server/char_device.c
> index 1c48719..5231bf0 100644
> --- a/server/char_device.c
> +++ b/server/char_device.c
> @@ -688,6 +688,9 @@ void spice_char_device_state_destroy(SpiceCharDeviceState *char_dev)
>       core->timer_remove(char_dev->write_to_dev_timer);
>       write_buffers_queue_free(&char_dev->write_queue);
>       write_buffers_queue_free(&char_dev->write_bufs_pool);
> +    if (char_dev->cur_write_buf) {
> +        spice_char_device_write_buffer_free(char_dev->cur_write_buf);
> +    }
>
>       while (!ring_is_empty(&char_dev->clients)) {
>           RingItem *item = ring_get_tail(&char_dev->clients);
>


More information about the Spice-devel mailing list