Fix UAF problem in wificond

This is a security upstream patch.

Bug: 175124730
Test: Verified the crash in rvc-qpr-dev using poc.cpp and test
instructions provided in the bug and verified the fix works.

Change-Id: Iabccac7f9fbed9d856bee41c5443e3b8479c3e62
Merged-In: Iabccac7f9fbed9d856bee41c5443e3b8479c3e62
(cherry picked from commit fae786e5bbc4adfbe5239b3bb3df0cd6122283a6)
(cherry picked from commit 67d87a0e7e2213959f505e6a355c50079b062037)
1 file changed