virtio: console: Ensure no memleaks in case of unused buffers
authorAmit Shah <amit.shah@redhat.com>
Fri, 12 Feb 2010 05:02:15 +0000 (10:32 +0530)
committerRusty Russell <rusty@rustcorp.com.au>
Wed, 24 Feb 2010 03:53:03 +0000 (14:23 +1030)
commita9cdd4855738906043b8131cfe8055d6cde88ffe
tree37ce268d3aceb90145d6d42d29b1f77a5bc1005f
parent298add723aecd7af461319fe815d935ef2c40d78
virtio: console: Ensure no memleaks in case of unused buffers

If unused data exists in in_vq, ensure we flush that first and then
detach unused buffers, which will ensure all buffers from the in_vq are
removed.

Also ensure we free the buffers after detaching them.

Signed-off-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
drivers/char/virtio_console.c