This is an automated email from the git hooks/post-receive script.
mreynolds pushed a commit to branch 389-ds-base-1.3.8 in repository 389-ds-base.
The following commit(s) were added to refs/heads/389-ds-base-1.3.8 by this push: new 87aed55 Pass argument into hashtable_new 87aed55 is described below
commit 87aed55eeeb9979760ed0414f0711349fa48fd3f Author: Stanislav Levin slev@altlinux.org AuthorDate: Wed Nov 28 12:49:07 2018 +0300
Pass argument into hashtable_new
@8915d8d87 and @4471b7350 modified "usetxn" parameter in "hashtable_new" scope (was a global variable before). But the callers of this function don't pass argument into. Thus, "usetxn" acts as an uninitialized auto variable.
Fixes: https://pagure.io/389-ds-base/issue/50057 --- ldap/servers/plugins/memberof/memberof.h | 2 +- ldap/servers/plugins/memberof/memberof_config.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/ldap/servers/plugins/memberof/memberof.h b/ldap/servers/plugins/memberof/memberof.h index cf02845..f049d38 100644 --- a/ldap/servers/plugins/memberof/memberof.h +++ b/ldap/servers/plugins/memberof/memberof.h @@ -102,7 +102,7 @@ void *memberof_get_plugin_id(void); void memberof_release_config(void); PRUint64 get_plugin_started(void); void ancestor_hashtable_entry_free(memberof_cached_value *entry); -PLHashTable *hashtable_new(); +PLHashTable *hashtable_new(int usetxn); int memberof_use_txn();
#endif /* _MEMBEROF_H_ */ diff --git a/ldap/servers/plugins/memberof/memberof_config.c b/ldap/servers/plugins/memberof/memberof_config.c index 8a27f52..04d5924 100644 --- a/ldap/servers/plugins/memberof/memberof_config.c +++ b/ldap/servers/plugins/memberof/memberof_config.c @@ -698,8 +698,8 @@ memberof_copy_config(MemberOfConfig *dest, MemberOfConfig *src)
/* Allocate our caches here since we only copy the config at the start of an op */ if (memberof_use_txn() == 1){ - dest->ancestors_cache = hashtable_new(); - dest->fixup_cache = hashtable_new(); + dest->ancestors_cache = hashtable_new(1); + dest->fixup_cache = hashtable_new(1); }
/* Check if the copy is already up to date */
389-commits@lists.fedoraproject.org