Browse Source

GCS_MAVLINK: prevent closedir() with nullptr

zr-v5.1
Andrew Tridgell 5 years ago
parent
commit
c1d4a5bd35
  1. 1
      libraries/GCS_MAVLink/GCS_FTP.cpp

1
libraries/GCS_MAVLink/GCS_FTP.cpp

@ -548,7 +548,6 @@ void GCS_MAVLINK::ftp_list_dir(struct pending_ftp &request, struct pending_ftp & @@ -548,7 +548,6 @@ void GCS_MAVLINK::ftp_list_dir(struct pending_ftp &request, struct pending_ftp &
auto *dir = AP::FS().opendir((char *)request.data);
if (dir == nullptr) {
ftp_error(response, FTP_ERROR::FailErrno);
AP::FS().closedir(dir);
return;
}

Loading…
Cancel
Save