From 1845f1b951f18fbb919c3168fc933ab74dd4781d Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Thu, 13 Sep 2007 22:39:33 +0000 Subject: [PATCH] fix double free - related to ITS#4860 and probably ITS#4873 --- servers/slapd/sets.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/servers/slapd/sets.c b/servers/slapd/sets.c index dc1bc85843..3393e83bf3 100644 --- a/servers/slapd/sets.c +++ b/servers/slapd/sets.c @@ -182,6 +182,9 @@ slap_set_join( } } + /* pointers to values have been used in set - don't free twice */ + op_flags |= SLAP_SET_LREFVAL; + last = i; for ( i = 0; !BER_BVISNULL( &rset[ i ] ); i++ ) { @@ -210,6 +213,10 @@ slap_set_join( last++; } } + + /* pointers to values have been used in set - don't free twice */ + op_flags |= SLAP_SET_RREFVAL; + BER_BVZERO( &set[ last ] ); } break; -- 2.39.5