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:
Beat Küng 2017-10-02 14:47:27 +02:00 committed by Lorenz Meier
parent c47e541d02
commit 8016d69ba4
1 changed files with 1 additions and 0 deletions

View File

@ -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;
}