diff options
author | Brad King <brad.king@kitware.com> | 2020-03-20 10:16:50 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2020-03-20 10:17:00 (GMT) |
commit | 94139ac58e2a4b1c4e3360b6d0da31ba9ba23c3c (patch) | |
tree | 6b5c0327c0f54ad107e5057894486c1b54be5aba /Source/cmMakefile.h | |
parent | 9bbea2344b058734047b0c889b2a6dae13c85cec (diff) | |
parent | 8affe9aa336b873e9c8e40ec5911ffe23c2ef03a (diff) | |
download | CMake-94139ac58e2a4b1c4e3360b6d0da31ba9ba23c3c.zip CMake-94139ac58e2a4b1c4e3360b6d0da31ba9ba23c3c.tar.gz CMake-94139ac58e2a4b1c4e3360b6d0da31ba9ba23c3c.tar.bz2 |
Merge topic 'export-repeat'
8affe9aa33 export: Fix use-after-free on multiple calls overwriting same FILE
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4494
Diffstat (limited to 'Source/cmMakefile.h')
-rw-r--r-- | Source/cmMakefile.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h index 081e69d..d628681 100644 --- a/Source/cmMakefile.h +++ b/Source/cmMakefile.h @@ -954,10 +954,11 @@ public: const std::vector<std::unique_ptr<cmGeneratorExpressionEvaluationFile>>& GetEvaluationFiles() const; - std::vector<cmExportBuildFileGenerator*> GetExportBuildFileGenerators() - const; + std::vector<std::unique_ptr<cmExportBuildFileGenerator>> const& + GetExportBuildFileGenerators() const; void RemoveExportBuildFileGeneratorCMP0024(cmExportBuildFileGenerator* gen); - void AddExportBuildFileGenerator(cmExportBuildFileGenerator* gen); + void AddExportBuildFileGenerator( + std::unique_ptr<cmExportBuildFileGenerator> gen); // Maintain a stack of package roots to allow nested PACKAGE_ROOT_PATH // searches @@ -1062,7 +1063,8 @@ private: mutable cmsys::RegularExpression cmNamedCurly; std::vector<cmMakefile*> UnConfiguredDirectories; - std::vector<cmExportBuildFileGenerator*> ExportBuildFileGenerators; + std::vector<std::unique_ptr<cmExportBuildFileGenerator>> + ExportBuildFileGenerators; std::vector<std::unique_ptr<cmGeneratorExpressionEvaluationFile>> EvaluationFiles; |