diff options
author | Wei Yongjun <yongjun_wei@trendmicro.com.cn> | 2013-03-15 17:20:08 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-03-15 09:05:36 -0700 |
commit | 13b47d5f79f76293abda13c8b39570659bb9e9ca (patch) | |
tree | 287030d60dd913db02baea49c405573a27c6c6a1 /drivers/staging/sep | |
parent | e72b7bbd178bf0081b5f62f1daaf86a7daf13f3e (diff) | |
download | linux-13b47d5f79f76293abda13c8b39570659bb9e9ca.tar.gz linux-13b47d5f79f76293abda13c8b39570659bb9e9ca.tar.bz2 linux-13b47d5f79f76293abda13c8b39570659bb9e9ca.zip |
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 <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/sep')
-rw-r--r-- | drivers/staging/sep/sep_main.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; } |