staging: echo.c: fix memory leakage
authorCong Ding <dinggnu@gmail.com>
Sat, 22 Dec 2012 16:12:26 +0000 (17:12 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 7 Jan 2013 22:03:32 +0000 (14:03 -0800)
commit0902468846460274018100bec29e2b236f70ab14
treec608a7eb03d255d6197c2407f117471c036203bb
parent78855c7a7c3db183ddb311cd832a137ef7a5e83a
staging: echo.c: fix memory leakage

we should check the return value of calling function fir16_create(): a NULL
value means the memory allocation fails.

this patch also cleans up the error handling in function function oslec_create()

Signed-off-by: Cong Ding <dinggnu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/echo/echo.c