Commit d8e5b342 authored by Peter Eisentraut's avatar Peter Eisentraut

pg_restore: Fix memory and file descriptor leak with directory format

found by Coverity
parent 693ff85d
......@@ -356,6 +356,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));
}
/*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment