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

Commit 64d502e9 authored by Ashish Kumar Dhanotiya's avatar Ashish Kumar Dhanotiya Committed by nshrivas
Browse files

qcacld-3.0: Possible memory leak in __iw_setnone_getint api

Dynamically allocated memory is not freed in error case
for sme_config in set none get int api, this may lead to
mem leak in error case.

Free the dynamically alolocated memory in error case.
Change-Id: I8db2be12412709c48cdbb2466c20e15415c576ca
CRs-Fixed: 2466334
parent e0d37639
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -5798,7 +5798,8 @@ static int __iw_setnone_getint(struct net_device *dev,
		if (QDF_STATUS_SUCCESS !=
		    sme_cfg_get_int(mac_handle, WNI_CFG_CURRENT_TX_POWER_LEVEL,
				    &txpow2g)) {
			return -EIO;
			ret = -EIO;
			break;
		}
		hdd_debug("2G tx_power %d", txpow2g);
		break;
@@ -5815,7 +5816,8 @@ static int __iw_setnone_getint(struct net_device *dev,
		if (QDF_STATUS_SUCCESS !=
		    sme_cfg_get_int(mac_handle, WNI_CFG_CURRENT_TX_POWER_LEVEL,
				    &txpow5g)) {
			return -EIO;
			ret = -EIO;
			break;
		}
		hdd_debug("5G tx_power %d", txpow5g);
		break;