1
0
mirror of https://github.com/postgrespro/pg_probackup.git synced 2025-01-25 11:53:32 +02:00

[PBCKP-101] fix accessing already freed memory

This commit is contained in:
Grigory Smolkin 2020-05-31 22:49:45 +03:00
parent c5dc624a79
commit 122f88ba56

View File

@ -99,7 +99,7 @@ do_restore_or_validate(time_t target_backup_id, pgRecoveryTarget *rt,
{
int i = 0;
int j = 0;
parray *backups;
parray *backups = NULL;
pgBackup *tmp_backup = NULL;
pgBackup *current_backup = NULL;
pgBackup *dest_backup = NULL;
@ -475,13 +475,14 @@ do_restore_or_validate(time_t target_backup_id, pgRecoveryTarget *rt,
/* ssh connection to longer needed */
fio_disconnect();
elog(INFO, "%s of backup %s completed.",
action, base36enc(dest_backup->start_time));
/* cleanup */
parray_walk(backups, pgBackupFree);
parray_free(backups);
parray_free(parent_chain);
elog(INFO, "%s of backup %s completed.",
action, base36enc(dest_backup->start_time));
return 0;
}