mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-24 06:53:34 +08:00
Delete stream name in same thread as where its created
This commit is contained in:
@@ -1027,6 +1027,8 @@ Mavlink::configure_stream_threadsafe(const char *stream_name, const float rate)
|
|||||||
do {
|
do {
|
||||||
usleep(MAIN_LOOP_DELAY / 2);
|
usleep(MAIN_LOOP_DELAY / 2);
|
||||||
} while (_subscribe_to_stream != nullptr);
|
} while (_subscribe_to_stream != nullptr);
|
||||||
|
|
||||||
|
delete s;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1448,7 +1450,6 @@ Mavlink::task_main(int argc, char *argv[])
|
|||||||
warnx("stream %s on device %s not found", _subscribe_to_stream, _device_name);
|
warnx("stream %s on device %s not found", _subscribe_to_stream, _device_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
delete _subscribe_to_stream;
|
|
||||||
_subscribe_to_stream = nullptr;
|
_subscribe_to_stream = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user