[WCNCR00158507] misc: fix unequal memory alloc/free count

[Description]
The debug counter didn't been protect for synchronous issue.
But the allocation/free part is fine, so protect the debug counter.

Test: WiFi scan/connection are OK

Change-Id: I02445a1812118455b80e9c428f91aced7c1b5c3d
CR-Id: WCNCR00158507
Feature: misc:
Signed-off-by: YuChe Tsai <yuche.tsai@mediatek.com>
(cherry picked from commit 7eebb33ae1cbe330b6c6359bfe6c6355e7d6fc8a)
1 file changed