diff options
author | Andrew Zaborowski <andrew.zaborowski@intel.com> | 2020-03-18 15:45:25 +0100 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2020-03-17 15:44:56 -0500 |
commit | f1aa208edf65377dfdbba9c34b56c666b92490c4 (patch) | |
tree | 5a39dedbbd659d56de2dfd7f2b7d9b6c7808278e | |
parent | 9147a6b726161649dd8d66fd8e6d6af23ed00ec1 (diff) | |
download | iwd-f1aa208edf65377dfdbba9c34b56c666b92490c4.tar.gz |
frame-xchg: Allow calling frame_xchg_stop from the callback
Don't crash if the user calls frame_xchg_stop(wdev) from inside the
frame exchange's final callback. That call is going to be redundant but
it's convenient to do this inside a cleanup function for a given wdev
without having to check whether any frame exchange was actually running.
-rw-r--r-- | src/frame-xchg.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/frame-xchg.c b/src/frame-xchg.c index d995a4c45..63610e0eb 100644 --- a/src/frame-xchg.c +++ b/src/frame-xchg.c @@ -1266,9 +1266,10 @@ error: static void frame_xchg_exit(void) { struct l_queue *groups = watch_groups; + struct l_queue *xchgs = frame_xchgs; - l_queue_destroy(frame_xchgs, frame_xchg_cancel); frame_xchgs = NULL; + l_queue_destroy(xchgs, frame_xchg_cancel); watch_groups = NULL; l_queue_destroy(groups, frame_watch_group_destroy); |