From: Pierangelo Masarati Date: Thu, 13 Sep 2007 22:39:33 +0000 (+0000) Subject: fix double free - related to ITS#4860 and probably ITS#4873 X-Git-Tag: OPENLDAP_REL_ENG_2_4_9~20^2~649 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=1845f1b951f18fbb919c3168fc933ab74dd4781d;p=openldap fix double free - related to ITS#4860 and probably ITS#4873 --- 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;