pg_restore: Fix memory and file descriptor leak with directory format
found by Coverity
This commit is contained in:
parent
693ff85d47
commit
d8e5b3427a
|
@ -356,6 +356,9 @@ _PrintFileData(ArchiveHandle *AH, char *filename, RestoreOptions *ropt)
|
||||||
ahwrite(buf, 1, cnt, AH);
|
ahwrite(buf, 1, cnt, AH);
|
||||||
|
|
||||||
free(buf);
|
free(buf);
|
||||||
|
if (cfclose(cfp) != 0)
|
||||||
|
die_horribly(AH, modulename, "could not close data file: %s\n",
|
||||||
|
strerror(errno));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in New Issue