From c1d4a5bd351b054f490fff0cb5c91fd0dfd396f2 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 12 Mar 2020 16:28:27 +1100 Subject: [PATCH] GCS_MAVLINK: prevent closedir() with nullptr --- libraries/GCS_MAVLink/GCS_FTP.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/libraries/GCS_MAVLink/GCS_FTP.cpp b/libraries/GCS_MAVLink/GCS_FTP.cpp index 9dfb4dc7d1..ae015dfa93 100644 --- a/libraries/GCS_MAVLink/GCS_FTP.cpp +++ b/libraries/GCS_MAVLink/GCS_FTP.cpp @@ -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; }