From: Jiri Slaby Date: Sat, 6 Nov 2010 09:06:50 +0000 (+0100) Subject: Char: virtio_console, fix memory leak X-Git-Tag: v2.6.37-rc4~35^2~1 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=22e132ff2645aab1e1a25c45e9544a39ae1dc106;p=pandora-kernel.git 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: Jiri Slaby Cc: Amit Shah Cc: virtualization@lists.linux-foundation.org Cc: Greg Kroah-Hartman Signed-off-by: Rusty Russell --- Reading git-diff-tree failed