X-Git-Url: https://git.octo.it/?a=blobdiff_plain;ds=sidebyside;f=src%2Fopenldap.c;h=227c8e1149161a6a9ba8a7e62e45e604745949c8;hb=ff0d8b0879c81f4743f38637063c0e26194f3e00;hp=b3fcb10fcbef13c1512fa83a577d84152ff911a5;hpb=f519b4b222ab9253e70b6cda7605d7c58ff771b4;p=collectd.git diff --git a/src/openldap.c b/src/openldap.c index b3fcb10f..227c8e11 100644 --- a/src/openldap.c +++ b/src/openldap.c @@ -535,7 +535,7 @@ static int cldap_init(void) /* {{{ */ static int cldap_shutdown(void) /* {{{ */ { for (size_t i = 0; i < databases_num; i++) - if (databases[i]->ld != NULL) + if (databases[i] != NULL && databases[i]->ld != NULL) ldap_unbind_ext_s(databases[i]->ld, NULL, NULL); sfree(databases); databases_num = 0;