line6: fix memory leaks in line6_init_midi()
commit982d6ab50115025c63f4b9f7175614008c41d449
authorJesper Juhl <jj@chaosbits.net>
Mon, 24 Oct 2011 21:41:37 +0000 (24 23:41 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Sun, 27 Nov 2011 00:14:11 +0000 (26 16:14 -0800)
treefefa5059cef8da3dbb942a69eb217daad5bd322b
parent6f37aca827e6d075c9e9d3ab1b233cce2a3bc9f1
line6: fix memory leaks in line6_init_midi()

If the first call to line6_midibuf_init() fails we'll leak a little
bit of memory. If the second call fails we'll leak a bit more. This
happens when we return from the function and the local variable
'line6midi' goes out of scope.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/line6/midi.c