mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-03 13:58:53 +08:00
mavlink_log_handler: set current_log_filep to NULL after closing the file
It probably did not cause further issues, except that fclose() was called on an invalid file handle later on.
This commit is contained in:
@@ -429,6 +429,7 @@ LogListHelper::get_log_data(uint8_t len, uint8_t *buffer)
|
||||
|
||||
if (offset && fseek(current_log_filep, offset, SEEK_CUR)) {
|
||||
fclose(current_log_filep);
|
||||
current_log_filep = nullptr;
|
||||
PX4LOG_WARN("MavlinkLogHandler::get_log_data Seek error in %s\n", current_log_filename);
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user