projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
openldap: Fixed possible dereference of NULL pointer
[collectd.git]
/
src
/
openldap.c
diff --git
a/src/openldap.c
b/src/openldap.c
index
b3fcb10
..
227c8e1
100644
(file)
--- 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++)
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;
ldap_unbind_ext_s(databases[i]->ld, NULL, NULL);
sfree(databases);
databases_num = 0;