From: Marek Becka Date: Tue, 16 Jun 2015 14:59:20 +0000 (-0400) Subject: fix openldap segfatult when ldapi is used v2 X-Git-Tag: collectd-5.5.1~107 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=b842268ca7212869d8b984e921c986309d427161;p=collectd.git fix openldap segfatult when ldapi is used v2 --- diff --git a/src/openldap.c b/src/openldap.c index e6888499..8667058e 100644 --- a/src/openldap.c +++ b/src/openldap.c @@ -604,7 +604,8 @@ static int cldap_config_add (oconfig_item_t *ci) /* {{{ */ st->name, st->url); status = -1; } - else if (ludpp->lud_host != NULL) + + if ((status == 0) && (ludpp->lud_host != NULL)) { st->host = strdup (ludpp->lud_host); }