]> git.baikalelectronics.ru Git - kernel.git/commit
line6: fix memory leaks in line6_init_midi()
authorJesper Juhl <jj@chaosbits.net>
Mon, 24 Oct 2011 21:41:37 +0000 (23:41 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Sun, 27 Nov 2011 00:14:11 +0000 (16:14 -0800)
commitbd1e75801cba0c22c2fe525bce2e5b489323b735
treefefa5059cef8da3dbb942a69eb217daad5bd322b
parent1105badd2997bd6b8e1c79374bcee49ac42fbe69
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