From b842268ca7212869d8b984e921c986309d427161 Mon Sep 17 00:00:00 2001 From: Marek Becka Date: Tue, 16 Jun 2015 10:59:20 -0400 Subject: [PATCH] fix openldap segfatult when ldapi is used v2 --- src/openldap.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); } -- 2.30.2