]> git.saurik.com Git - apt.git/commitdiff
fix memory leak in getLanguages() by closing the directory after checking
authorDavid Kalnischkies <kalnischkies@gmail.com>
Wed, 3 Mar 2010 20:29:01 +0000 (21:29 +0100)
committerDavid Kalnischkies <kalnischkies@gmail.com>
Wed, 3 Mar 2010 20:29:01 +0000 (21:29 +0100)
apt-pkg/aptconfiguration.cc

index 10613f11dde7d356e43e41c924ccca7c0adc1bca..f3f94dce3a6dc9760cbeb7709fa97f6c4b5a807c 100644 (file)
@@ -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