summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/benchmark/cmake/posix_regex.cpp
diff options
context:
space:
mode:
Diffstat (limited to '3rdparty/benchmark/cmake/posix_regex.cpp')
-rw-r--r--3rdparty/benchmark/cmake/posix_regex.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/3rdparty/benchmark/cmake/posix_regex.cpp b/3rdparty/benchmark/cmake/posix_regex.cpp
index a31af80481a..466dc62560a 100644
--- a/3rdparty/benchmark/cmake/posix_regex.cpp
+++ b/3rdparty/benchmark/cmake/posix_regex.cpp
@@ -7,6 +7,8 @@ int main() {
if (ec != 0) {
return ec;
}
- return regexec(&re, str.c_str(), 0, nullptr, 0) ? -1 : 0;
+ int ret = regexec(&re, str.c_str(), 0, nullptr, 0) ? -1 : 0;
+ regfree(&re);
+ return ret;
}