summaryrefslogtreecommitdiff
path: root/usr.sbin/smtpd/smtp.c
diff options
context:
space:
mode:
authorCharles Longeau <chl@cvs.openbsd.org>2012-10-03 16:43:20 +0000
committerCharles Longeau <chl@cvs.openbsd.org>2012-10-03 16:43:20 +0000
commitdda472ec5c5ed8fb58070f3d9ca58cd49d608ac9 (patch)
treebb596c2d9a572516c9ac1c6a58c6bda1f6174d8e /usr.sbin/smtpd/smtp.c
parent40e3b31eb52791f78d8294f973e18e478768dd5a (diff)
don't try to cope with iobuf_init() failure, make it fatal() instead.
from eric@ input ok gilles@
Diffstat (limited to 'usr.sbin/smtpd/smtp.c')
-rw-r--r--usr.sbin/smtpd/smtp.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/usr.sbin/smtpd/smtp.c b/usr.sbin/smtpd/smtp.c
index c1e1cf3c3cd..12107f81e59 100644
--- a/usr.sbin/smtpd/smtp.c
+++ b/usr.sbin/smtpd/smtp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: smtp.c,v 1.118 2012/10/02 12:37:38 chl Exp $ */
+/* $OpenBSD: smtp.c,v 1.119 2012/10/03 16:43:19 chl Exp $ */
/*
* Copyright (c) 2008 Gilles Chehade <gilles@openbsd.org>
@@ -508,10 +508,8 @@ smtp_new(struct listener *l)
s->s_l = l;
strlcpy(s->s_msg.tag, l->tag, sizeof(s->s_msg.tag));
- if (iobuf_init(&s->s_iobuf, MAX_LINE_SIZE, MAX_LINE_SIZE) == -1) {
- free(s);
- return (NULL);
- }
+ if (iobuf_init(&s->s_iobuf, MAX_LINE_SIZE, MAX_LINE_SIZE) == -1)
+ fatal("iobuf_init");
io_init(&s->s_io, -1, s, session_io, &s->s_iobuf);
s->s_state = S_CONNECTED;