Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0769b277 authored by Amitkumar Karwar's avatar Amitkumar Karwar Committed by Kalle Valo
Browse files

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: default avatarAmitkumar Karwar <akarwar@marvell.com>
Signed-off-by: default avatarCathy Luo <cluo@marvell.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent e065ddb8
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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;
	}

+1 −0
Original line number Diff line number Diff line
@@ -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;
	}