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 e688849..8667058 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);
                }