From: Martin Willi Date: Wed, 6 Nov 2013 09:10:49 +0000 (+0100) Subject: leak-detective: Call {gm,local}time_r() to allocate static buffer X-Git-Tag: 5.1.2dr1~33^2~49 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=56866ecf3d469cacadd36c2d37e397b8daa45fcc;p=thirdparty%2Fstrongswan.git leak-detective: Call {gm,local}time_r() to allocate static buffer On OS X Mavericks, these functions use a static allocation and are hard to whitelist using other means. --- diff --git a/src/libstrongswan/utils/leak_detective.c b/src/libstrongswan/utils/leak_detective.c index 16e0237906..36ed1735cd 100644 --- a/src/libstrongswan/utils/leak_detective.c +++ b/src/libstrongswan/utils/leak_detective.c @@ -587,7 +587,12 @@ char *whitelist[] = { */ static void init_static_allocations() { + struct tm tm; + time_t t = 0; + tzset(); + gmtime_r(&t, &tm); + localtime_r(&t, &tm); } /**