aboutsummaryrefslogtreecommitdiff
path: root/src/bin/pg_rewind/filemap.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/bin/pg_rewind/filemap.c')
-rw-r--r--src/bin/pg_rewind/filemap.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/bin/pg_rewind/filemap.c b/src/bin/pg_rewind/filemap.c
index f1beb371203..a28d1667d4c 100644
--- a/src/bin/pg_rewind/filemap.c
+++ b/src/bin/pg_rewind/filemap.c
@@ -652,18 +652,17 @@ isRelDataFile(const char *path)
static char *
datasegpath(RelFileLocator rlocator, ForkNumber forknum, BlockNumber segno)
{
- char *path;
+ RelPathStr path;
char *segpath;
path = relpathperm(rlocator, forknum);
if (segno > 0)
{
- segpath = psprintf("%s.%u", path, segno);
- pfree(path);
+ segpath = psprintf("%s.%u", path.str, segno);
return segpath;
}
else
- return path;
+ return pstrdup(path.str);
}
/*