GCS_MAVLINK: prevent closedir() with nullptr

This commit is contained in:
Andrew Tridgell 2020-03-12 16:28:27 +11:00
parent 8d1bf46dab
commit c1d4a5bd35
1 changed files with 0 additions and 1 deletions

View File

@ -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); auto *dir = AP::FS().opendir((char *)request.data);
if (dir == nullptr) { if (dir == nullptr) {
ftp_error(response, FTP_ERROR::FailErrno); ftp_error(response, FTP_ERROR::FailErrno);
AP::FS().closedir(dir);
return; return;
} }