Skip to content

Commit

Permalink
staging: sep: fix possible memory leak in sep_prepare_input_dma_table()
Browse files Browse the repository at this point in the history
'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>
  • Loading branch information
Wei Yongjun authored and Greg Kroah-Hartman committed Mar 15, 2013
1 parent e72b7bb commit 13b47d5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/staging/sep/sep_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 13b47d5

Please sign in to comment.