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:
@@ -587,7 +587,12 @@ char *whitelist[] = {
|
|||||||
*/
|
*/
|
||||||
static void init_static_allocations()
|
static void init_static_allocations()
|
||||||
{
|
{
|
||||||
|
struct tm tm;
|
||||||
|
time_t t = 0;
|
||||||
|
|
||||||
tzset();
|
tzset();
|
||||||
|
gmtime_r(&t, &tm);
|
||||||
|
localtime_r(&t, &tm);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user