From: Kurt Zeilenga Date: Thu, 21 Oct 1999 17:52:33 +0000 (+0000) Subject: Hack to free seqorset when ber_free(ber, 1) is called. X-Git-Tag: UCDATA_2_4~335 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=10e886a60146b030d15ea59c6236b58bbc8ab515;p=openldap Hack to free seqorset when ber_free(ber, 1) is called. --- diff --git a/libraries/liblber/io.c b/libraries/liblber/io.c index cbcbb84ba3..57a2eceb4b 100644 --- a/libraries/liblber/io.c +++ b/libraries/liblber/io.c @@ -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 );