diff options
author | Bob Beck <beck@cvs.openbsd.org> | 2004-03-11 18:32:18 +0000 |
---|---|---|
committer | Bob Beck <beck@cvs.openbsd.org> | 2004-03-11 18:32:18 +0000 |
commit | 4a3ee45ceabb65d20f8e9ccb3f521dd8f1495cbf (patch) | |
tree | ca609a8ce3bfaa4584c2dc62ad2d546d42c66093 /libexec | |
parent | 953b473214f2286c7565f2db3d64bf3aab81c8ab (diff) |
fix bug where custom 450 messages are not displayed,
found by yongari@kt-is.co.kr
ok dhartmei@, millert@
Diffstat (limited to 'libexec')
-rw-r--r-- | libexec/spamd/spamd.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libexec/spamd/spamd.c b/libexec/spamd/spamd.c index cc813202193..714172972c2 100644 --- a/libexec/spamd/spamd.c +++ b/libexec/spamd/spamd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: spamd.c,v 1.57 2004/03/10 00:33:39 beck Exp $ */ +/* $OpenBSD: spamd.c,v 1.58 2004/03/11 18:32:17 beck Exp $ */ /* * Copyright (c) 2002 Theo de Raadt. All rights reserved. @@ -442,12 +442,8 @@ build_reply(struct con *cp) int off = 0; matches = cp->blacklists; - if (matches == NULL) { - free(cp->obuf); - cp->obuf = NULL; - cp->osize = 0; + if (matches == NULL) goto nomatch; - } for (; *matches; matches++) { int used = 0; char *c = cp->obuf + off; @@ -469,8 +465,12 @@ build_reply(struct con *cp) cp->obuf[off] = '\0'; } } + return; nomatch: /* No match. give generic reply */ + free(cp->obuf); + cp->obuf = NULL; + cp->osize = 0; if (cp->blacklists != NULL) asprintf(&cp->obuf, "%s-Sorry %s\n" |