staging: lustre: Don't leak 'buffer' in cfs_get_environ()
authorJesper Juhl <jj@chaosbits.net>
Mon, 30 Sep 2013 20:44:37 +0000 (22:44 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 1 Oct 2013 01:33:13 +0000 (18:33 -0700)
If 'down_read_trylock' fails we'll curently leak the memory allocated to 'buffer'.
Fix the leak by simply kfree'ing 'buffer' before returning '-EDEADLK'.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

No differences found