forked from Archive/PX4-Autopilot
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:
parent
c47e541d02
commit
8016d69ba4
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue