summaryrefslogtreecommitdiff
path: root/usr.sbin/smtpd/smtpctl.c
diff options
context:
space:
mode:
authorGilles Chehade <gilles@cvs.openbsd.org>2016-02-03 08:03:22 +0000
committerGilles Chehade <gilles@cvs.openbsd.org>2016-02-03 08:03:22 +0000
commit985450f0bdd6b9a048d108a0f15699b6d50d745a (patch)
treec8ee0ffb9dd68ba47858b2adf04af1fda79c764e /usr.sbin/smtpd/smtpctl.c
parent5a04b7146307d1001bf9a68c4320c8dbc7e817f7 (diff)
NULL initialize two file pointers to make it more obvious when reading that
they can't end up uninitialized after the mkstemp/fdopen dance
Diffstat (limited to 'usr.sbin/smtpd/smtpctl.c')
-rw-r--r--usr.sbin/smtpd/smtpctl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/smtpd/smtpctl.c b/usr.sbin/smtpd/smtpctl.c
index f0a2d72a202..5f14062d7f7 100644
--- a/usr.sbin/smtpd/smtpctl.c
+++ b/usr.sbin/smtpd/smtpctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: smtpctl.c,v 1.144 2015/12/28 22:08:30 jung Exp $ */
+/* $OpenBSD: smtpctl.c,v 1.145 2016/02/03 08:03:21 gilles Exp $ */
/*
* Copyright (c) 2013 Eric Faurot <eric@openbsd.org>
@@ -1248,7 +1248,7 @@ display(const char *s)
if (is_encrypted_fp(fp)) {
int i;
int fd;
- FILE *ofp;
+ FILE *ofp = NULL;
char sfn[] = "/tmp/smtpd.XXXXXXXXXX";
if ((fd = mkstemp(sfn)) == -1 ||