summaryrefslogtreecommitdiff
path: root/libexec/spamd/spamd.c
diff options
context:
space:
mode:
authorGleydson Soares <gsoares@cvs.openbsd.org>2014-03-26 13:09:03 +0000
committerGleydson Soares <gsoares@cvs.openbsd.org>2014-03-26 13:09:03 +0000
commit2c5f5a1fad027e30e970b772f13480ad7ec27ecd (patch)
tree65d0f6f7c393cd3f7761ea83fe6981a72c9fac91 /libexec/spamd/spamd.c
parentfff378530c23e87cca322fac20bdf88501def98c (diff)
strdup() returns NULL if out of memory, we should check it.
OK beck@
Diffstat (limited to 'libexec/spamd/spamd.c')
-rw-r--r--libexec/spamd/spamd.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libexec/spamd/spamd.c b/libexec/spamd/spamd.c
index 27a50417100..e3262fbd939 100644
--- a/libexec/spamd/spamd.c
+++ b/libexec/spamd/spamd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: spamd.c,v 1.113 2013/11/19 18:33:38 deraadt Exp $ */
+/* $OpenBSD: spamd.c,v 1.114 2014/03/26 13:09:02 gsoares Exp $ */
/*
* Copyright (c) 2002-2007 Bob Beck. All rights reserved.
@@ -669,6 +669,8 @@ initcon(struct con *cp, int fd, struct sockaddr *sa)
if (greylist && blackcount > maxblack)
cp->stutter = 0;
cp->lists = strdup(loglists(cp));
+ if (cp->lists == NULL)
+ err(1, "malloc");
}
else
cp->lists = NULL;