Tuesday, May 14, 2019

[389-commits] [389-ds-base] branch 389-ds-base-1.4.0 updated: Ticket 50340 cont - structs for disabled plugins will not be freed

This is an automated email from the git hooks/post-receive script.

lkrispen pushed a commit to branch 389-ds-base-1.4.0
in repository 389-ds-base.

The following commit(s) were added to refs/heads/389-ds-base-1.4.0 by this push:
new 8ea3643 Ticket 50340 cont - structs for disabled plugins will not be freed
8ea3643 is described below

commit 8ea36434965a6e60ad9e8803f711adfb799594e2
Author: Ludwig Krispenz <lkrispen@redhat.com>
AuthorDate: Tue May 14 11:38:53 2019 +0200

Ticket 50340 cont - structs for disabled plugins will not be freed

Bug: The original fix did free structs for not enabled plugins, but
they remained in the depenendency list of plugins and when the
list was processed a freed struct could be accessed

Fix: do not add a disabled plugin to the plugin dependency list

Reviewed by: Mark, thanks
---
ldap/servers/slapd/plugin.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ldap/servers/slapd/plugin.c b/ldap/servers/slapd/plugin.c
index 601a012..7dfab84 100644
--- a/ldap/servers/slapd/plugin.c
+++ b/ldap/servers/slapd/plugin.c
@@ -3031,7 +3031,7 @@ plugin_setup(Slapi_Entry *plugin_entry, struct slapi_componentid *group, slapi_p
add_plugin_entry_dn(dn_copy);
}

- if (add_entry) {
+ if (add_entry && enabled) {
/* make a copy of the plugin entry for our own use because it will
be freed later by the caller */
Slapi_Entry *e_copy = slapi_entry_dup(plugin_entry);

--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
_______________________________________________
389-commits mailing list -- 389-commits@lists.fedoraproject.org
To unsubscribe send an email to 389-commits-leave@lists.fedoraproject.org
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/389-commits@lists.fedoraproject.org

No comments:

Post a Comment