From 10e886a60146b030d15ea59c6236b58bbc8ab515 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Thu, 21 Oct 1999 17:52:33 +0000 Subject: [PATCH] Hack to free seqorset when ber_free(ber, 1) is called. --- libraries/liblber/io.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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 ); -- 2.39.5