Browse Source

qcacmn: Track size of qdf_mem_list

Decrement qdf_mem_list.count when removing elements to avoid
assert when destroying the list.

Change-Id: I0d0989f3a9009184b898b8b27517e6d12fa3dc97
CRs-Fixed: 1063093
Houston Hoffman 8 years ago
parent
commit
fd52ffbe33
1 changed files with 1 additions and 0 deletions
  1. 1 0
      qdf/linux/src/qdf_mem.c

+ 1 - 0
qdf/linux/src/qdf_mem.c

@@ -602,6 +602,7 @@ void qdf_mem_free(void *ptr)
 	 * The empty list check will guarantee that we avoid a race condition.
 	 */
 	list_del_init(&mem_struct->node);
+	qdf_mem_list.count--;
 	qdf_spin_unlock_irqrestore(&qdf_mem_list_lock);
 	kfree(mem_struct);
 	return;