mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-21 03:10:25 +08:00
Hack to free seqorset when ber_free(ber, 1) is called.
This commit is contained in:
parent
64e8eeaa95
commit
10e886a601
@ -202,10 +202,18 @@ ber_free( BerElement *ber, int freebuf )
|
||||
|
||||
assert( BER_VALID( ber ) );
|
||||
|
||||
if ( freebuf && ber->ber_buf != NULL )
|
||||
if ( freebuf ) {
|
||||
Seqorset *s, *next;
|
||||
LBER_FREE( ber->ber_buf );
|
||||
|
||||
for( s = ber->ber_sos ; s != NULL ; s = next ) {
|
||||
next = s->sos_next;
|
||||
LBER_FREE( s );
|
||||
}
|
||||
}
|
||||
|
||||
ber->ber_buf = NULL;
|
||||
ber->ber_sos = NULL;
|
||||
ber->ber_valid = LBER_UNINITIALIZED;
|
||||
|
||||
LBER_FREE( (char *) ber );
|
||||
|
Loading…
Reference in New Issue
Block a user