fix openldap segfatult when ldapi is used
[collectd.git] / src / openldap.c
index bca686e..e688849 100644 (file)
@@ -604,7 +604,7 @@ static int cldap_config_add (oconfig_item_t *ci) /* {{{ */
                                st->name, st->url);
                        status = -1;
                }
-               else
+               else if (ludpp->lud_host != NULL)
                {
                        st->host = strdup (ludpp->lud_host);
                }