summaryrefslogtreecommitdiffstats
path: root/moduli.c
diff options
context:
space:
mode:
authordoug@openbsd.org <doug@openbsd.org>2014-08-21 03:08:52 +0200
committerDamien Miller <djm@mindrot.org>2014-10-13 02:37:21 +0200
commit7df8818409c752cf3f0c3f8044fe9aebed8647bd (patch)
treed5fd861ecaf40e6d0441d37f2cca85739c876876 /moduli.c
parentupstream commit (diff)
downloadopenssh-7df8818409c752cf3f0c3f8044fe9aebed8647bd.tar.xz
openssh-7df8818409c752cf3f0c3f8044fe9aebed8647bd.zip
upstream commit
Free resources on error in mkstemp and fdopen ok djm@
Diffstat (limited to 'moduli.c')
-rw-r--r--moduli.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/moduli.c b/moduli.c
index bb4dd7beb..474caca67 100644
--- a/moduli.c
+++ b/moduli.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: moduli.c,v 1.28 2013/10/24 00:49:49 dtucker Exp $ */
+/* $OpenBSD: moduli.c,v 1.29 2014/08/21 01:08:52 doug Exp $ */
/*
* Copyright 1994 Phil Karn <karn@qualcomm.com>
* Copyright 1996-1998, 2003 William Allen Simpson <wsimpson@greendragon.com>
@@ -461,6 +461,7 @@ write_checkpoint(char *cpfile, u_int32_t lineno)
}
if ((fp = fdopen(r, "w")) == NULL) {
logit("write_checkpoint: fdopen: %s", strerror(errno));
+ unlink(tmp);
close(r);
return;
}