Merge branch 'collectd-5.4' into collectd-5.5
[collectd.git] / src / openldap.c
index bca686e..8667058 100644 (file)
@@ -604,7 +604,8 @@ static int cldap_config_add (oconfig_item_t *ci) /* {{{ */
                                st->name, st->url);
                        status = -1;
                }
-               else
+
+               if ((status == 0) && (ludpp->lud_host != NULL))
                {
                        st->host = strdup (ludpp->lud_host);
                }