qcacmn: Fix use after free for vdev in tdls
When disconnect happens, TDLS_NOTIFY_STA_DISCONNECTION will be
send to scheduler_thread, in bad case, it is processed after
3s later, and the vdev passed in notify msg has been freed in
the period, invalid vdev causes invalid memory access.
change as below:
1.1 Get vdev ref before send msg
1.2 register callback for release ref
1.3 send msg to scheduler_thread
1.4 process tdls notify msg and call callback function.
Change-Id: I2b03db8b30db623796f2e8299f14ee31e28efb91
CRs-Fixed: 2275019
6 files changed