Ensure we always call fclose when writing checkpoints. In the case of
authordtucker <dtucker@openbsd.org>
Thu, 2 Mar 2023 06:41:56 +0000 (06:41 +0000)
committerdtucker <dtucker@openbsd.org>
Thu, 2 Mar 2023 06:41:56 +0000 (06:41 +0000)
commit74d3852900aa6960cee175bbf4effb366bb2ce21
tree6a9a84ccfe491ef44cea88ac785b17d12d8cdc36
parent11666e1d3026883ad915be3b6109715017794b66
Ensure we always call fclose when writing checkpoints.   In the case of
an fprintf failure we would not call fclose which would leak the FILE
pointer.  While we're there, try to clean up the temp file on failure.
Spotted by Coverity, ok djm@
usr.bin/ssh/moduli.c