diff --git a/media/mtp/MtpServer.cpp b/media/mtp/MtpServer.cpp index f74f395e5f011..5ba6be918477e 100644 --- a/media/mtp/MtpServer.cpp +++ b/media/mtp/MtpServer.cpp @@ -736,6 +736,7 @@ static void deleteRecursive(const char* path) { unlink(pathbuf); } } + closedir(dir); } static void deletePath(const char* path) {