summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Faurot <eric@cvs.openbsd.org>2012-09-11 16:24:29 +0000
committerEric Faurot <eric@cvs.openbsd.org>2012-09-11 16:24:29 +0000
commitde6e10d5b73351083495105a6417b88938a5dfa9 (patch)
treeabb45ca5a90bada61982956d69e2a8347ceffce8
parent476bcfdaafca0342925213178301a71e32b2a0f2 (diff)
Initialize fd correctly. This fixes a lot of problems.
ok gilles@
-rw-r--r--usr.sbin/smtpd/mta_session.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/smtpd/mta_session.c b/usr.sbin/smtpd/mta_session.c
index f2b0101f5ed..3ca6fc0cf95 100644
--- a/usr.sbin/smtpd/mta_session.c
+++ b/usr.sbin/smtpd/mta_session.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mta_session.c,v 1.15 2012/09/11 15:05:49 eric Exp $ */
+/* $OpenBSD: mta_session.c,v 1.16 2012/09/11 16:24:28 eric Exp $ */
/*
* Copyright (c) 2008 Pierre-Yves Ritschard <pyr@openbsd.org>
@@ -128,6 +128,7 @@ mta_session(struct mta_route *route)
session->id = generate_uid();
session->route = route;
session->state = MTA_INIT;
+ session->io.sock = -1;
tree_xset(&sessions, session->id, session);
TAILQ_INIT(&session->hosts);