1
0
mirror of https://github.com/postgrespro/pg_probackup.git synced 2024-12-12 11:45:24 +02:00

Fix incorrect usage of tempname in fio_gzopen

This commit is contained in:
Konstantin Knizhnik 2019-02-17 10:27:00 +03:00
parent fb74027c42
commit 00c3bed898

View File

@ -696,7 +696,8 @@ gzFile fio_gzopen(char const* path, char const* mode, int* tmp_fd, fio_location
gzFile file;
if (fio_is_remote(location))
{
int fd = mkstemp("gz.XXXXXX");
char pattern[] = "gz.XXXXXX";
int fd = mkstemp(pattern);
if (fd < 0)
return NULL;
if (strcmp(mode, PG_BINARY_W) == 0)