diff options
author | Vihas Makwana <makvihas@gmail.com> | 2022-03-10 02:20:47 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-03-15 15:18:32 +0100 |
commit | 1868755c9078cda1a3a4abd866edd42f9a46b1ed (patch) | |
tree | 04e9023a7071a3108901565a7b350d03870d6e52 /tools/perf/scripts/python/stackcollapse.py | |
parent | 57a42b4d73f9d6f6fbe8b11f22453e1bc3183648 (diff) |
staging: r8188eu: proper error handling in rtw_init_drv_sw
The code inside rtw_init_drv_sw() calls various init functions to
populate the padapter structure and checks for their return values
respectively.
But if one of the functions in middle fails then it simply returns
_FAIL instead of proper logging and calling freeing counterparts
of previous init functions.
This leads to various memory leaks and can be found in
/sys/kernel/debug/kmemleak if kernel is compiled with DEBUG_KMEMLEAK=y.
Fix this and keep the success and error separate.
Fixes: 2b42bd58b321 ("staging: r8188eu: introduce new os_dep dir for RTL8188eu driver")
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Pavel Skripkin <paskripkin@gmail.com>
Signed-off-by: Vihas Makwana <makvihas@gmail.com>
Link: https://lore.kernel.org/r/20220309205047.45981-3-makvihas@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions