Code

fix openldap segfatult when ldapi is used v2
authorMarek Becka <marek.becka@superhosting.cz>
Tue, 16 Jun 2015 14:59:20 +0000 (10:59 -0400)
committerMarc Fournier <marc.fournier@camptocamp.com>
Wed, 17 Jun 2015 12:57:54 +0000 (14:57 +0200)
src/openldap.c

index e68884996776780aa5d4e0ea4a3b76a37d39082d..8667058ed049b164d7e496f37917253e55adcf14 100644 (file)
@@ -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);
                }