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:
1 parent
ef6d78d6ef
commit
56866ecf3d
1 file changed
+5
@@ -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