diff options
Diffstat (limited to 'src/backend/access/transam/xlogbackup.c')
-rw-r--r-- | src/backend/access/transam/xlogbackup.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/backend/access/transam/xlogbackup.c b/src/backend/access/transam/xlogbackup.c index c01c1f90102..90b5273b028 100644 --- a/src/backend/access/transam/xlogbackup.c +++ b/src/backend/access/transam/xlogbackup.c @@ -23,15 +23,16 @@ * When ishistoryfile is true, it creates the contents for a backup history * file, otherwise it creates contents for a backup_label file. * - * Returns the result generated as a palloc'd StringInfo. + * Returns the result generated as a palloc'd string. */ -StringInfo +char * build_backup_content(BackupState *state, bool ishistoryfile) { char startstrbuf[128]; char startxlogfile[MAXFNAMELEN]; /* backup start WAL file */ XLogSegNo startsegno; StringInfo result = makeStringInfo(); + char *data; Assert(state != NULL); @@ -76,5 +77,8 @@ build_backup_content(BackupState *state, bool ishistoryfile) appendStringInfo(result, "STOP TIMELINE: %u\n", state->stoptli); } - return result; + data = result->data; + pfree(result); + + return data; } |