Fix crash when there are two blacklist hosts without intervening reason.

This is invalid configuration; the first host is supposed to be ignored.
This commit is contained in:
Jilles Tjoelker 2014-09-21 14:41:51 +02:00
parent ed5d7eb122
commit 2196b1825d

View file

@ -1910,11 +1910,11 @@ conf_set_blacklist_matches(void *data)
static void
conf_set_blacklist_reason(void *data)
{
yy_blacklist_reason = rb_strdup(data);
rb_dlink_node *ptr, *nptr;
if (yy_blacklist_host && yy_blacklist_reason)
if (yy_blacklist_host && data)
{
yy_blacklist_reason = rb_strdup(data);
if (yy_blacklist_ipv6)
{
/* Make sure things fit (64 = alnum count + dots) */