Kaynağa Gözat

cnss_prealloc: clean up prealloc mempool and cache on deinit

Cnss prealloc is trying to allocate memory from mempool
for wlan host driver even after cnss prealloc pool has been
destroyed by platform driver because mempool and cache is
not cleaned up on cnss pool deinit. Clean up mempool and
cache on prealloc deinit.

Change-Id: If28a27f5a21441e8650bb846ded889a33580ceaf
CRs-Fixed: 3488178
Sandeep Singh 1 yıl önce
ebeveyn
işleme
32e1756a19
1 değiştirilmiş dosya ile 2 ekleme ve 0 silme
  1. 2 0
      cnss_prealloc/cnss_prealloc.c

+ 2 - 0
cnss_prealloc/cnss_prealloc.c

@@ -166,6 +166,8 @@ static void cnss_pool_deinit(void)
 			cnss_pools[i].name);
 		mempool_destroy(cnss_pools[i].mp);
 		kmem_cache_destroy(cnss_pools[i].cache);
+		cnss_pools[i].mp = NULL;
+		cnss_pools[i].cache = NULL;
 	}
 }