mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-15 03:01:09 +08:00
Fix to prevent freeing the same pointer twice on mod errors
This commit is contained in:
parent
3b49944829
commit
25323de5cb
@ -244,8 +244,6 @@ do_modify(
|
||||
cleanup:
|
||||
free( dn );
|
||||
free( ndn );
|
||||
if ( modtail != NULL && *modtail != NULL )
|
||||
free( *modtail );
|
||||
if ( modlist != NULL )
|
||||
modlist_free( modlist );
|
||||
return rc;
|
||||
@ -315,7 +313,9 @@ modlist_free(
|
||||
for ( ; ml != NULL; ml = next ) {
|
||||
next = ml->ml_next;
|
||||
|
||||
free( ml->ml_type );
|
||||
if (ml->ml_type)
|
||||
free( ml->ml_type );
|
||||
|
||||
if ( ml->ml_bvalues != NULL )
|
||||
ber_bvecfree( ml->ml_bvalues );
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user