[PATCH] staging: lustre: Don't leak 'buffer' in cfs_get_environ()

2013-09-30 Thread Jesper Juhl
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 --- .../lustre/lustre/libcfs/linux/linux-curproc.c |4 +++- 1 files changed, 3 insertions(+), 1

[PATCH] staging: lustre: Don't leak 'buffer' in cfs_get_environ()

2013-09-30 Thread Jesper Juhl
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 j...@chaosbits.net --- .../lustre/lustre/libcfs/linux/linux-curproc.c |4 +++- 1 files changed, 3