Przeglądaj źródła

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

David Kalnischkies 16 lat temu
rodzic
commit
cf0e078c44
1 zmienionych plików z 1 dodań i 0 usunięć
  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);
 			builtin.push_back(c);
 		}
 		}
 	}
 	}
+	closedir(D);
 
 
 	// get the environment language codes: LC_MESSAGES (and later LANGUAGE)
 	// get the environment language codes: LC_MESSAGES (and later LANGUAGE)
 	// we extract both, a long and a short code and then we will
 	// we extract both, a long and a short code and then we will