summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f519b4b)
raw | patch | inline | side by side (parent: f519b4b)
author | Pavel Rochnyack <pavel2000@ngs.ru> | |
Mon, 24 Jul 2017 07:05:16 +0000 (14:05 +0700) | ||
committer | Pavel Rochnyack <pavel2000@ngs.ru> | |
Mon, 24 Jul 2017 07:07:27 +0000 (14:07 +0700) |
If `plugin_register_complex_read()` has failed, then `cldap_free` is called which set pointer to NULL.
That pointer is accessed by `cldap_shutdown()` callback later.
That pointer is accessed by `cldap_shutdown()` callback later.
src/openldap.c | patch | blob | history |
diff --git a/src/openldap.c b/src/openldap.c
index b3fcb10fcbef13c1512fa83a577d84152ff911a5..227c8e1149161a6a9ba8a7e62e45e604745949c8 100644 (file)
--- a/src/openldap.c
+++ b/src/openldap.c
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;