mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-25 00:59:45 -05:00
Fix redundant frees
This commit is contained in:
parent
b06eeff43b
commit
4e4356cf2c
1 changed files with 17 additions and 5 deletions
|
|
@ -422,10 +422,22 @@ oc_delete( ObjectClass *oc )
|
|||
static void
|
||||
oc_clean( ObjectClass *o )
|
||||
{
|
||||
if (o->soc_sups) ldap_memfree(o->soc_sups);
|
||||
if (o->soc_required) ldap_memfree(o->soc_required);
|
||||
if (o->soc_allowed) ldap_memfree(o->soc_allowed);
|
||||
if (o->soc_oidmacro) ldap_memfree(o->soc_oidmacro);
|
||||
if (o->soc_sups) {
|
||||
ldap_memfree(o->soc_sups);
|
||||
o->soc_sups = NULL;
|
||||
}
|
||||
if (o->soc_required) {
|
||||
ldap_memfree(o->soc_required);
|
||||
o->soc_required = NULL;
|
||||
}
|
||||
if (o->soc_allowed) {
|
||||
ldap_memfree(o->soc_allowed);
|
||||
o->soc_allowed = NULL;
|
||||
}
|
||||
if (o->soc_oidmacro) {
|
||||
ldap_memfree(o->soc_oidmacro);
|
||||
o->soc_oidmacro = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
@ -476,7 +488,7 @@ oc_next( ObjectClass **oc )
|
|||
{
|
||||
assert( oc != NULL );
|
||||
|
||||
#if 1 /* pedantic check */
|
||||
#if 0 /* pedantic check: breaks when deleting an oc, don't use it. */
|
||||
{
|
||||
ObjectClass *tmp = NULL;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue