mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-21 04:33:10 +08:00
return with error from _log_request_list() in case of failed allocation
This commit is contained in:
committed by
Lorenz Meier
parent
b566de2c36
commit
ad2d65df8d
@@ -171,6 +171,11 @@ MavlinkLogHandler::_log_request_list(const mavlink_message_t *msg)
|
||||
_pLogHandlerHelper = new LogListHelper;
|
||||
}
|
||||
|
||||
if (!_pLogHandlerHelper) {
|
||||
PX4_ERR("LogListHelper alloc failed");
|
||||
return;
|
||||
}
|
||||
|
||||
if (_pLogHandlerHelper->log_count) {
|
||||
//-- Define (and clamp) range
|
||||
_pLogHandlerHelper->next_entry = request.start < _pLogHandlerHelper->log_count ? request.start :
|
||||
|
||||
Reference in New Issue
Block a user