Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 25 Dec 2018 13:37:43 +0000 (UTC)
From:      Andriy Voskoboinyk <avos@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org
Subject:   svn commit: r342461 - stable/12/sys/dev/iwi
Message-ID:  <201812251337.wBPDbhR4043339@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: avos
Date: Tue Dec 25 13:37:43 2018
New Revision: 342461
URL: https://svnweb.freebsd.org/changeset/base/342461

Log:
  MFC r342185:
  iwi(4): do not leak node reference when IWI_FLAG_ASSOCIATED flag is set.

Modified:
  stable/12/sys/dev/iwi/if_iwi.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/dev/iwi/if_iwi.c
==============================================================================
--- stable/12/sys/dev/iwi/if_iwi.c	Tue Dec 25 12:45:49 2018	(r342460)
+++ stable/12/sys/dev/iwi/if_iwi.c	Tue Dec 25 13:37:43 2018	(r342461)
@@ -2833,12 +2833,12 @@ iwi_auth_and_assoc(struct iwi_softc *sc, struct ieee80
 
 	IWI_LOCK_ASSERT(sc);
 
-	ni = ieee80211_ref_node(vap->iv_bss);
-
 	if (sc->flags & IWI_FLAG_ASSOCIATED) {
 		DPRINTF(("Already associated\n"));
 		return (-1);
 	}
+
+	ni = ieee80211_ref_node(vap->iv_bss);
 
 	IWI_STATE_BEGIN(sc, IWI_FW_ASSOCIATING);
 	error = 0;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201812251337.wBPDbhR4043339>