• J
    Char: virtio_console, fix memory leak · 22e132ff
    Jiri Slaby 提交于
    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: NJiri 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: NRusty Russell <rusty@rustcorp.com.au>
    22e132ff
virtio_console.c 43.7 KB