staging: wilc1000: replace MALLOC_WILC_BUFFER() macro to avoid possible memory leak
authorRaphaël Beamonte <raphael.beamonte@gmail.com>
Wed, 19 Aug 2015 03:14:50 +0000 (23:14 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 13 Sep 2015 01:24:28 +0000 (18:24 -0700)
commit297a1c34da83459e3f7160e2b75127b8935ef688
treee7ed6510b4487f6858cce9c072dbb36b25d14c3b
parent7a669e58615c8908cf15222a0ffe1042995cfcd9
staging: wilc1000: replace MALLOC_WILC_BUFFER() macro to avoid possible memory leak

The MALLOC_WILC_BUFFER() macro was using a return statement, and didn't
take care of possible memory leaks and subsequent bugs when it was failing
after succeeding some allocations. This patch corrects this behavior.

Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/wilc1000/wilc_exported_buf.c