From: Timo Sirainen Date: Wed, 4 Aug 2010 12:49:54 +0000 (+0100) Subject: doveadm director map/add/remove: Fixed handling IP address as parameter. X-Git-Tag: 2.0.rc4~10 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=eee73872e8d975f7b2d48a5a1b34a94588331ec5;p=thirdparty%2Fdovecot%2Fcore.git doveadm director map/add/remove: Fixed handling IP address as parameter. Only host names were working correctly. --- diff --git a/src/doveadm/doveadm-director.c b/src/doveadm/doveadm-director.c index ddb948d2fa..82645c9bf0 100644 --- a/src/doveadm/doveadm-director.c +++ b/src/doveadm/doveadm-director.c @@ -241,7 +241,8 @@ static void director_get_host(const char *host, struct ip_addr **ips_r, struct ip_addr ip; if (net_addr2ip(host, &ip) == 0) { - *ips_r = &ip; + *ips_r = t_new(struct ip_addr, 1); + **ips_r = ip; *ips_count_r = 1; } else { if (net_gethostbyname(host, ips_r, ips_count_r) < 0)