diff --git a/src/scan.c b/src/scan.c index e05c4aea..628685d4 100644 --- a/src/scan.c +++ b/src/scan.c @@ -375,8 +375,10 @@ bool scan_cancel(uint32_t ifindex, uint32_t id) if (sr->id == id && sr->triggered) { sr->callback = NULL; - if (sr->destroy) + if (sr->destroy) { sr->destroy(sr->userdata); + sr->destroy = NULL; + } return true; }