This is an automated email from the git hooks/post-receive script.
mreynolds pushed a commit to branch master
in repository 389-ds-base.
The following commit(s) were added to refs/heads/master by this push:
new 37f919a Ticket 50300 - Fix memory leak in automember plugin
37f919a is described below
commit 37f919a79a719c485742bb0bc2e09d8b2018a2b6
Author: Mark Reynolds <mreynolds(a)redhat.com>
AuthorDate: Fri Mar 22 16:27:15 2019 -0400
Ticket 50300 - Fix memory leak in automember plugin
Description: We were allocating a pblock long before it was used, and
we were returning from the function on an error before we
freed it. The fix just allocates the pblock right before
it's used, and then it is properly freed.
https://pagure.io/389-ds-base/issue/50300
Reviewed by: mreynolds (one line commit rule)
---
ldap/servers/plugins/automember/automember.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/ldap/servers/plugins/automember/automember.c
b/ldap/servers/plugins/automember/automember.c
index fcf0cdb..24fd874 100644
--- a/ldap/servers/plugins/automember/automember.c
+++ b/ldap/servers/plugins/automember/automember.c
@@ -1628,7 +1628,7 @@ out:
static int
automember_update_member_value(Slapi_Entry *member_e, const char *group_dn, char
*grouping_attr, char *grouping_value, PRFileDesc *ldif_fd, int add)
{
- Slapi_PBlock *mod_pb = slapi_pblock_new();
+ Slapi_PBlock *mod_pb = NULL;
int result = LDAP_SUCCESS;
LDAPMod mod;
LDAPMod *mods[2];
@@ -1708,6 +1708,7 @@ automember_update_member_value(Slapi_Entry *member_e, const char
*group_dn, char
member_value, grouping_attr, group_dn);
}
+ mod_pb = slapi_pblock_new();
slapi_modify_internal_set_pb(mod_pb, group_dn,
mods, 0, 0, automember_get_plugin_id(), 0);
slapi_modify_internal_pb(mod_pb);
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.