You've already forked pg_probackup
mirror of
https://github.com/postgrespro/pg_probackup.git
synced 2025-07-16 07:14:15 +02:00
[Issue #284] fix segfault in local timezone handling
This commit is contained in:
@ -1256,8 +1256,6 @@ parse_time(const char *value, time_t *result, bool utc_default)
|
||||
*result -= tz;
|
||||
}
|
||||
|
||||
pg_free(local_tz);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -1528,6 +1526,4 @@ time2iso(char *buf, size_t len, time_t time, bool utc)
|
||||
snprintf(ptr, len - (ptr - buf), ":%02d",
|
||||
abs((int) offset % SECS_PER_HOUR) / SECS_PER_MINUTE);
|
||||
}
|
||||
|
||||
pg_free(local_tz);
|
||||
}
|
||||
|
@ -1251,7 +1251,7 @@ pgut_unsetenv(const char *key)
|
||||
* leak memory.
|
||||
*/
|
||||
|
||||
envstr = (char *) malloc(strlen(key) + 2);
|
||||
envstr = (char *) pgut_malloc(strlen(key) + 2);
|
||||
if (!envstr) /* not much we can do if no memory */
|
||||
return;
|
||||
|
||||
|
Reference in New Issue
Block a user