]> git.baikalelectronics.ru Git - kernel.git/commit
airo: fix memory leaks
authorWenwen Wang <wenwen@cs.uga.edu>
Fri, 16 Aug 2019 03:50:02 +0000 (22:50 -0500)
committerKalle Valo <kvalo@codeaurora.org>
Tue, 3 Sep 2019 13:39:33 +0000 (16:39 +0300)
commit5b069345cc6ed21a6cb0e95da9d40391bfcaab1c
treeaf77e02f09aab82564f130ee324d957400b3f9ce
parentce68ff9cf3a55d7587d0dd84411b00635a6860e6
airo: fix memory leaks

In proc_BSSList_open(), 'file->private_data' is allocated through kzalloc()
and 'data->rbuffer' is allocated through kmalloc(). In the following
execution, if an error occurs, they are not deallocated, leading to memory
leaks. To fix this issue, free the allocated memory regions before
returning the error.

Signed-off-by: Wenwen Wang <wenwen@cs.uga.edu>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/cisco/airo.c