ldap/servers/plugins/replication/repl5_protocol_util.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
New commits:
commit 5769e192e220b8630b7ed6edc22b11d10f94730a
Author: Rich Megginson <rmeggins(a)redhat.com>
Date: Mon May 21 09:08:04 2012 -0600
Ticket #321 - krbExtraData is being null modified and replicated on each ssh login
Bug Description: Crash during IPA install
Fix Description: Have to free the mod before moving the unremoved mods
down the list on top of the freed mod.
Reviewed by: mreynolds (Thanks!)
(cherry picked from commit 758a68db83c653187203d683c9d9a71742314be5)
diff --git a/ldap/servers/plugins/replication/repl5_protocol_util.c
b/ldap/servers/plugins/replication/repl5_protocol_util.c
index 3327405..30d211a 100644
--- a/ldap/servers/plugins/replication/repl5_protocol_util.c
+++ b/ldap/servers/plugins/replication/repl5_protocol_util.c
@@ -707,6 +707,11 @@ repl5_strip_fractional_mods(Repl_Agmt *agmt, LDAPMod ** mods)
*/
if (0 == slapi_attr_type_cmp(mods[j]->mod_type, a[i], SLAPI_TYPE_CMP_SUBTYPE))
{
+ /* Adjust value of j, implicit in not incrementing it */
+ /* Free this mod */
+ ber_bvecfree(mods[j]->mod_bvalues);
+ slapi_ch_free((void **)&(mods[j]->mod_type));
+ slapi_ch_free((void **)&mods[j]);
/* Move down all subsequent mods */
for (k = j; mods[k+1] ; k++)
{
@@ -714,11 +719,6 @@ repl5_strip_fractional_mods(Repl_Agmt *agmt, LDAPMod ** mods)
}
/* Zero the end of the array */
mods[k] = NULL;
- /* Adjust value of j, implicit in not incrementing it */
- /* Free this mod */
- ber_bvecfree(mods[j]->mod_bvalues);
- slapi_ch_free((void **)&(mods[j]->mod_type));
- slapi_ch_free((void **)&mods[j]);
} else {
j++;
}
Show replies by date