Commit: 9dd6df753a0a7e09e09cea0fdc0bc056389624d4
Parent: 1b46f5410de1f7911808e106323acc7c87413af8
Author: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Committer: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Date: 2020-06-10 23:20:39
Tree: 279fd5f61665fb73de103aa57f46592315d7ad34

adapter: Fix possible crash when stopping discovery If the client disconnect/crash while MGMT_OP_STOP_DISCOVERY was pending it would possibly cause a crash as the client pointer is passed to mgmt_send and accessed in the callback after being freed. To fix this the adapter itself is now passed to the callback so the client is not accessed directly, instead the code now checks if discovery_list has not been cleared in the meantime and only then proceed to access the client pointer which is how MGMT_OP_START_DISCOVERY is handled.

Diffstat

M src/adapter.c | 12 ++++++++++- -

1 files changed, 10 insertions(+), 2 deletions(-)

View Full Diff | Patch