From: Wei Yongjun Date: Fri, 15 Mar 2013 09:20:08 +0000 (+0800) Subject: staging: sep: fix possible memory leak in sep_prepare_input_dma_table() X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=13b47d5f79f76293abda13c8b39570659bb9e9ca;p=openwrt%2Fstaging%2Fblogic.git staging: sep: fix possible memory leak in sep_prepare_input_dma_table() 'lli_array_ptr' etc. are malloced in sep_prepare_input_dma_table() and should be freed before leaving from the error handling case, otherwise it will cause memory leak. Signed-off-by: Wei Yongjun Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/sep/sep_main.c b/drivers/staging/sep/sep_main.c index f5b73419eebc..6a98a208bbf2 100644 --- a/drivers/staging/sep/sep_main.c +++ b/drivers/staging/sep/sep_main.c @@ -1986,7 +1986,7 @@ static int sep_prepare_input_dma_table(struct sep_device *sep, dma_ctx, sep_lli_entries); if (error) - return error; + goto end_function_error; lli_table_alloc_addr = *dmatables_region; }