From 5534a4ec4d134b085c99e36f28ef718b25124fa3 Mon Sep 17 00:00:00 2001 From: Keve Date: Sat, 7 Dec 2024 20:56:21 +0100 Subject: [PATCH] Fix leak std::string creates a copy of the string used for initialization which needs to be freed manually. --- atf-c++/tests.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/atf-c++/tests.cpp b/atf-c++/tests.cpp index b701d27b..60e8694d 100644 --- a/atf-c++/tests.cpp +++ b/atf-c++/tests.cpp @@ -272,6 +272,7 @@ impl::tc::get_md_vars(void) char **ptr; for (ptr = array; *ptr != NULL; ptr += 2) vars[*ptr] = *(ptr + 1); + atf_utils_free_charpp(array); } catch (...) { atf_utils_free_charpp(array); throw;