From: David Kalnischkies Date: Wed, 3 Mar 2010 20:29:01 +0000 (+0100) Subject: fix memory leak in getLanguages() by closing the directory after checking X-Git-Tag: 0.8.0~9^2~64^2~33 X-Git-Url: https://git.saurik.com/apt.git/commitdiff_plain/cf0e078c440226e0009bb861486b974a03842f7b?ds=inline fix memory leak in getLanguages() by closing the directory after checking --- diff --git a/apt-pkg/aptconfiguration.cc b/apt-pkg/aptconfiguration.cc index 10613f11d..f3f94dce3 100644 --- a/apt-pkg/aptconfiguration.cc +++ b/apt-pkg/aptconfiguration.cc @@ -152,6 +152,7 @@ std::vector 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