mirror of
https://github.com/postgres/postgres.git
synced 2026-04-21 06:08:26 -04:00
pg_restore: Fix memory and file descriptor leak with directory format
found by Coverity
This commit is contained in:
parent
805f798e0e
commit
b6948e1546
1 changed files with 3 additions and 0 deletions
|
|
@ -365,6 +365,9 @@ _PrintFileData(ArchiveHandle *AH, char *filename, RestoreOptions *ropt)
|
|||
ahwrite(buf, 1, cnt, AH);
|
||||
|
||||
free(buf);
|
||||
if (cfclose(cfp) != 0)
|
||||
die_horribly(AH, modulename, "could not close data file: %s\n",
|
||||
strerror(errno));
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in a new issue