Pārlūkot izejas kodu

qcacmn: Fix for memleak in VLAN cases

During wlan_crypto_setkey, the mem_alloc for key is done and
all keyidx within WLAN_CRYPTO_MAX_VLANKEYIX are to freed in
crypto_free_key.

Change-Id: Ieae0f9f4eecabe1fb23812a9e436037bb4dad128
CRs-Fixed: 3296394
Kani M 2 gadi atpakaļ
vecāks
revīzija
2cfc1273ba
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  1. 1 1
      umac/cmn_services/crypto/src/wlan_crypto_obj_mgr.c

+ 1 - 1
umac/cmn_services/crypto/src/wlan_crypto_obj_mgr.c

@@ -182,7 +182,7 @@ static void wlan_crypto_free_key(struct wlan_crypto_comp_priv *crypto_priv)
 		return;
 	}
 
-	for (i = 0; i < WLAN_CRYPTO_MAXKEYIDX; i++) {
+	for (i = 0; i < WLAN_CRYPTO_MAX_VLANKEYIX; i++) {
 		if (crypto_priv->key[i]) {
 			qdf_mem_free(crypto_priv->key[i]);
 			crypto_priv->key[i] = NULL;