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

Commit d8a5c680 authored by Srinivas Dasari's avatar Srinivas Dasari Committed by Gerrit - the friendly Code Review server
Browse files

qcacld-3.0: Fix ref leak for temp sta info node

hdd_is_connection_in_progress_iterator loops through all adapters
and the sta_info present in each adapter to find out
if any connection is in progress. In SAP case, there could be
multiple sta_info present and need to traverse through them by
avoiding running into loop on the same sta_info/released
sta_info. The hdd_for_each_sta_ref_safe helps for the same but
takes two references, one for sta_info and one for a
temporary entry. Release both after checking the
connection status.

Change-Id: I58a49e12b6d581dbaf1c129ce5a5196b31fb432f
CRs-Fixed: 3188412
parent c1a09ef6
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -18551,6 +18551,10 @@ static QDF_STATUS hdd_is_connection_in_progress_iterator(
			hdd_put_sta_info_ref(
				&adapter->sta_info_list, &sta_info, true,
				STA_INFO_CONNECTION_IN_PROGRESS_ITERATOR);
			if (tmp)
				hdd_put_sta_info_ref(
				    &adapter->sta_info_list, &tmp, true,
				    STA_INFO_CONNECTION_IN_PROGRESS_ITERATOR);
			return QDF_STATUS_E_ABORTED;
		}