Skip to content
  • Jiri Slaby's avatar
    Char: virtio_console, fix memory leak · 22e132ff
    Jiri Slaby authored
    
    
    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>
    22e132ff