projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2573097
)
openldap: use ldap_unbind_ext_s() to avoid memory leak
author
Marc Fournier
<marc.fournier@camptocamp.com>
Tue, 1 Jul 2014 15:31:07 +0000
(17:31 +0200)
committer
Marc Fournier
<marc.fournier@camptocamp.com>
Fri, 29 Aug 2014 13:09:52 +0000
(15:09 +0200)
... as ldap_destroy() is only available in newer libldap versions.
src/openldap.c
patch
|
blob
|
history
diff --git
a/src/openldap.c
b/src/openldap.c
index
5a04578
..
7ce789f
100644
(file)
--- a/
src/openldap.c
+++ b/
src/openldap.c
@@
-94,7
+94,7
@@
static int ldap_init_host (ldap_t *st) /* {{{ */
ERROR ("openldap plugin: Failed to start tls on %s: %s",
st->url, ldap_err2string (rc));
st->state = 0;
- ldap_
destroy(st->ld
);
+ ldap_
unbind_ext_s(st->ld, NULL, NULL
);
return (-1);
}
}
@@
-109,7
+109,7
@@
static int ldap_init_host (ldap_t *st) /* {{{ */
ERROR ("openldap plugin: Failed to bind to %s: %s",
st->url, ldap_err2string (rc));
st->state = 0;
- ldap_
destroy(st->ld
);
+ ldap_
unbind_ext_s(st->ld, NULL, NULL
);
return (-1);
}
else