[WCNCR00155755] misc: Fix memory access and release issues in stat command

[Description]
Fix memory access and release issues in stat command

1. Refine the memory release handling flow.
2. Check pucMacAddr is null or not before use.

Change-Id: I1a63f674b337f5ae57f09ed933472d38ff79d854
Signed-off-by: Awk Jiang <awk.jiang@mediatek.com>
CR-Id: WCNCR00155755
Feature: misc
1 file changed