Hack to free seqorset when ber_free(ber, 1) is called.

This commit is contained in:
Kurt Zeilenga 1999-10-21 17:52:33 +00:00
parent 64e8eeaa95
commit 10e886a601

View File

@ -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 );