提交 0769b277 编写于 作者: A Amitkumar Karwar 提交者: Kalle Valo

mwifiex: fix a possible double free issue

As drv_info_dump pointer doesn't get reset, we may end up
freeing the allocated memory twice.
Signed-off-by: NAmitkumar Karwar <akarwar@marvell.com>
Signed-off-by: NCathy Luo <cluo@marvell.com>
Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
上级 e065ddb8
......@@ -435,6 +435,7 @@ mwifiex_adapter_cleanup(struct mwifiex_adapter *adapter)
if (adapter->drv_info_dump) {
vfree(adapter->drv_info_dump);
adapter->drv_info_dump = NULL;
adapter->drv_info_size = 0;
}
......
......@@ -886,6 +886,7 @@ void mwifiex_dump_drv_info(struct mwifiex_adapter *adapter)
if (adapter->drv_info_dump) {
vfree(adapter->drv_info_dump);
adapter->drv_info_dump = NULL;
adapter->drv_info_size = 0;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册