mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-28 18:49:34 -05:00
Fix double free of filter when bad.
This commit is contained in:
parent
a3cf741ab7
commit
365f6bf69b
1 changed files with 2 additions and 1 deletions
|
|
@ -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 );
|
||||
|
|
|
|||
Loading…
Reference in a new issue