Просмотр исходного кода

fix memory leak in getLanguages() by closing the directory after checking

David Kalnischkies лет назад: 16
Родитель
Сommit
cf0e078c44
1 измененных файлов с 1 добавлено и 0 удалено
  1. 1 0
      apt-pkg/aptconfiguration.cc

+ 1 - 0
apt-pkg/aptconfiguration.cc

@@ -152,6 +152,7 @@ std::vector<std::string> const Configuration::getLanguages(bool const &All,
 			builtin.push_back(c);
 		}
 	}
+	closedir(D);
 
 	// get the environment language codes: LC_MESSAGES (and later LANGUAGE)
 	// we extract both, a long and a short code and then we will