Page MenuHomeFreeBSD

D38036.diff
No OneTemporary

D38036.diff

diff --git a/contrib/tzcode/localtime.c b/contrib/tzcode/localtime.c
--- a/contrib/tzcode/localtime.c
+++ b/contrib/tzcode/localtime.c
@@ -1761,7 +1761,10 @@
if ((p_tm = malloc(sizeof(*p_tm))) == NULL) {
return (NULL);
}
- _pthread_setspecific(localtime_key, p_tm);
+ if (_pthread_setspecific(localtime_key, p_tm) != 0) {
+ free(p_tm);
+ return (NULL);
+ }
}
}
return localtime_tzset(timep, p_tm, true);
@@ -1829,7 +1832,10 @@
if ((p_tm = malloc(sizeof(*p_tm))) == NULL) {
return (NULL);
}
- _pthread_setspecific(gmtime_key, p_tm);
+ if (_pthread_setspecific(gmtime_key, p_tm) != 0) {
+ free(p_tm);
+ return (NULL);
+ }
}
}
return gmtime_r(timep, p_tm);

File Metadata

Mime Type
text/plain
Expires
Wed, Sep 25, 10:26 AM (5 h, 6 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
12607359
Default Alt Text
D38036.diff (719 B)

Event Timeline