Ver Fonte

qcacld-3.0: Fix vdev reference leak in packet capture mode

Currently vdev reference is not released if attribute of vendor
command QCA_NL80211_VENDOR_SUBCMD_SET_MONITOR_MODE is invalid.
Fix this vdev reference leak by releasing the vdev reference in
above error case.

Change-Id: Ib3019dc02b6a3f48fc25f4bbe40e8de9f311a4c6
CRs-Fixed: 3344228
Surabhi Vishnoi há 2 anos atrás
pai
commit
114b9dcb49
1 ficheiros alterados com 3 adições e 1 exclusões
  1. 3 1
      os_if/pkt_capture/src/os_if_pkt_capture.c

+ 3 - 1
os_if/pkt_capture/src/os_if_pkt_capture.c

@@ -85,8 +85,10 @@ QDF_STATUS os_if_monitor_mode_configure(struct hdd_adapter *adapter,
 		return QDF_STATUS_E_INVAL;
 	}
 
-	if (tb[SET_MONITOR_MODE_INVALID])
+	if (tb[SET_MONITOR_MODE_INVALID]) {
+		hdd_objmgr_put_vdev_by_user(vdev, WLAN_PKT_CAPTURE_ID);
 		return QDF_STATUS_E_FAILURE;
+	}
 
 	if (tb[SET_MONITOR_MODE_DATA_TX_FRAME_TYPE] &&
 	    nla_get_u32(tb[SET_MONITOR_MODE_DATA_TX_FRAME_TYPE]) <