author | Pavel Rochnyack <pavel2000@ngs.ru> | |
Mon, 24 Jul 2017 08:07:16 +0000 (15:07 +0700) | ||
committer | Pavel Rochnyack <pavel2000@ngs.ru> | |
Tue, 25 Jul 2017 13:19:45 +0000 (20:19 +0700) | ||
commit | ee2af3ba8ed42f5f04962f56edb59b80eb545f77 | |
tree | 947ad43d6562f83c458dc1f95953c620ac373071 | tree | snapshot |
parent | d1d1a799a4dd0818877d6d5c1e6c2884c84373ce | commit | diff |
openldap: Fix plugin shutdown with connection failed
When plugin failes to connect to LDAP server, the `ldap_unbind_ext_s(st->ld)` is called.
According to `man 3 ldap_unbind_ext_s`, that call is used to free the resources contained in the ld structure.
When plugin shutdown, the `ldap_unbind_ext_s` called again, which causes coredump.
The plugin code was changed to set st->ld to NULL after `ldap_unbind_ext_s()` call.
When plugin failes to connect to LDAP server, the `ldap_unbind_ext_s(st->ld)` is called.
According to `man 3 ldap_unbind_ext_s`, that call is used to free the resources contained in the ld structure.
When plugin shutdown, the `ldap_unbind_ext_s` called again, which causes coredump.
The plugin code was changed to set st->ld to NULL after `ldap_unbind_ext_s()` call.
src/openldap.c | diff | blob | history |