qcacld-3.0: Add msg.flush_callback for wma_send_msg_by_priority

If wma_send_msg with msg_type WMA_SET_LINK_STATE_RSP, tpLinkStateParams
params has a member callbackArg which is malloc from heap. If this
message is flushed when driver unload, because no msg.flush_callback is
supplied, the flush just free msg->bodyptr and callbackArg got leak.

Fix it by supply a flush_callback as wma_discard_fw_event, and minor
change to avoid NULL pointer access.

Change-Id: Ie979a1e83cbd7c87e5bbb08382ae2af3230a13db
CRs-Fixed: 2181458
1 file changed
tree: 78d55d18c0962efd1e3028b4adb48c6713c5a621
  1. components/
  2. core/
  3. uapi/
  4. Android.mk
  5. Kbuild
  6. Kconfig
  7. Makefile
  8. README.txt