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.
This commit is contained in:
Martin Willi
2013-11-06 10:30:59 +01:00
parent ef6d78d6ef
commit 56866ecf3d
+5
View File
@@ -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);
}
/**