Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit df12009

Browse files
committed
Fix SIGSEGV in write_backup_status
1 parent ab94800 commit df12009

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/catalog.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -230,11 +230,13 @@ write_backup_status(pgBackup *backup)
230230
pgBackup *tmp;
231231

232232
tmp = read_backup(backup->start_time);
233+
if (tmp != NULL)
234+
{
235+
tmp->status = backup->status;
236+
write_backup(tmp);
233237

234-
tmp->status = backup->status;
235-
write_backup(tmp);
236-
237-
pgBackupFree(tmp);
238+
pgBackupFree(tmp);
239+
}
238240
}
239241

240242
/*

0 commit comments

Comments
 (0)