From: Kurt Zeilenga Date: Wed, 3 Feb 1999 05:51:42 +0000 (+0000) Subject: Fix double free of filter when bad. X-Git-Tag: OPENLDAP_SLAPD_BACK_LDAP~651 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=365f6bf69b32898e8372a32936fbfd2b8be9068f;p=openldap Fix double free of filter when bad. --- diff --git a/servers/slapd/filter.c b/servers/slapd/filter.c index 5f4c686571..dff90b0446 100644 --- a/servers/slapd/filter.c +++ b/servers/slapd/filter.c @@ -47,7 +47,6 @@ get_filter( Connection *conn, BerElement *ber, Filter **filt, char **fstr ) */ f = (Filter *) ch_malloc( sizeof(Filter) ); - *filt = f; f->f_next = NULL; err = 0; @@ -175,6 +174,8 @@ get_filter( Connection *conn, BerElement *ber, Filter **filt, char **fstr ) if ( *fstr != NULL ) { free( *fstr ); } + } else { + *filt = f; } Debug( LDAP_DEBUG_FILTER, "end get_filter %d\n", err, 0, 0 );