Skip to content
Commit 22e132ff authored by Jiri Slaby's avatar Jiri Slaby Committed by Rusty Russell
Browse files

Char: virtio_console, fix memory leak



Stanse found that in init_vqs, memory is leaked under certain
circumstanses (the fail path order is incorrect). Fix that by checking
allocations in one turn and free all of them at once if some fails
(some may be NULL, but this is OK).

Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
Cc: Amit Shah <amit.shah@redhat.com>
Cc: virtualization@lists.linux-foundation.org
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
parent 7ae4b866
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment