Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit eb34f12b authored by sjur.brandeland@stericsson.com's avatar sjur.brandeland@stericsson.com Committed by Rusty Russell
Browse files

virtio_console: Free buffers from out-queue upon close



Free pending output buffers from the virtio out-queue when
host has acknowledged port_close.

Signed-off-by: default avatarSjur Brændeland <sjur.brandeland@stericsson.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (rebased & cut down)
parent 800ba5ea
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -1439,6 +1439,10 @@ static void remove_port_data(struct port *port)
	/* Remove buffers we queued up for the Host to send us data in. */
	while ((buf = virtqueue_detach_unused_buf(port->in_vq)))
		free_buf(buf);

	/* Free pending buffers from the out-queue. */
	while ((buf = virtqueue_detach_unused_buf(port->out_vq)))
		free_buf(buf);
}

/*