From: Pierangelo Masarati Date: Thu, 12 Jul 2007 22:22:31 +0000 (+0000) Subject: fix searchFilter double free (ITS#5043) X-Git-Tag: OPENLDAP_REL_ENG_2_4_MP~334 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=ca7ad7f2e320328912d6b3bc1335935961daa029;p=openldap fix searchFilter double free (ITS#5043) --- diff --git a/servers/slapd/overlays/rwmmap.c b/servers/slapd/overlays/rwmmap.c index b88cc4a2af..c1d3cafc95 100644 --- a/servers/slapd/overlays/rwmmap.c +++ b/servers/slapd/overlays/rwmmap.c @@ -768,7 +768,9 @@ rwm_filter_map_rewrite( case REWRITE_REGEXEC_OK: if ( !BER_BVISNULL( fstr ) ) { fstr->bv_len = strlen( fstr->bv_val ); - ch_free( ftmp.bv_val ); + if ( fstr->bv_val != ftmp.bv_val ) { + ch_free( ftmp.bv_val ); + } } else { *fstr = ftmp;