From ca7ad7f2e320328912d6b3bc1335935961daa029 Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Thu, 12 Jul 2007 22:22:31 +0000 Subject: [PATCH] fix searchFilter double free (ITS#5043) --- servers/slapd/overlays/rwmmap.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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; -- 2.39.5