mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-01-10 00:45:01 -05:00
don't free before use
This commit is contained in:
parent
f57a216f1c
commit
5564ee0173
1 changed files with 3 additions and 3 deletions
|
|
@ -789,9 +789,6 @@ rwm_filter_map_rewrite(
|
|||
case REWRITE_REGEXEC_OK:
|
||||
if ( !BER_BVISNULL( fstr ) ) {
|
||||
fstr->bv_len = strlen( fstr->bv_val );
|
||||
if ( fstr->bv_val != ftmp.bv_val ) {
|
||||
ch_free( ftmp.bv_val );
|
||||
}
|
||||
|
||||
} else {
|
||||
*fstr = ftmp;
|
||||
|
|
@ -800,6 +797,9 @@ rwm_filter_map_rewrite(
|
|||
Debug( LDAP_DEBUG_ARGS,
|
||||
"[rw] %s: \"%s\" -> \"%s\"\n",
|
||||
fdc.ctx, ftmp.bv_val, fstr->bv_val );
|
||||
if ( fstr->bv_val != ftmp.bv_val ) {
|
||||
ch_free( ftmp.bv_val );
|
||||
}
|
||||
rc = LDAP_SUCCESS;
|
||||
break;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue