aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTobias Brunner <tobias@strongswan.org>2016-09-13 17:28:21 +0200
committerTobias Brunner <tobias@strongswan.org>2016-09-20 16:26:05 +0200
commit95f9fa82d5574f08dca873941115ce60c8f14341 (patch)
tree9563d3259b054385a7fb7fa32c853e1290bde404 /src
parent6250e813ca8f4a70e3f96f13c08415548de62e52 (diff)
downloadstrongswan-95f9fa82d5574f08dca873941115ce60c8f14341.tar.bz2
strongswan-95f9fa82d5574f08dca873941115ce60c8f14341.tar.xz
leak-detective: Whitelist thread ID getter
In case an external thread calls into our code and logs messages, a thread object is allocated that will never be released. Even if we try to clean up the object via thread value destructor there is no guarantee that the thread actually terminates before we check for leaks, which seems to be the case for the Ada Tasking threads.
Diffstat (limited to 'src')
-rw-r--r--src/libstrongswan/utils/leak_detective.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libstrongswan/utils/leak_detective.c b/src/libstrongswan/utils/leak_detective.c
index e78938cfc..ad67c0380 100644
--- a/src/libstrongswan/utils/leak_detective.c
+++ b/src/libstrongswan/utils/leak_detective.c
@@ -494,7 +494,7 @@ static bool register_hooks()
* List of functions using static allocation buffers or should be suppressed
* otherwise on leak report.
*/
-char *whitelist[] = {
+static char *whitelist[] = {
/* backtraces, including own */
"backtrace_create",
"strerror_safe",
@@ -604,6 +604,8 @@ char *whitelist[] = {
"system__tasking__initialize",
"system__tasking__initialization__abort_defer",
"system__tasking__stages__create_task",
+ /* in case external threads call into our code */
+ "thread_current_id",
};
/**