]> git.sur5r.net Git - openldap/commitdiff
fix double free - related to ITS#4860 and probably ITS#4873
authorPierangelo Masarati <ando@openldap.org>
Thu, 13 Sep 2007 22:39:33 +0000 (22:39 +0000)
committerPierangelo Masarati <ando@openldap.org>
Thu, 13 Sep 2007 22:39:33 +0000 (22:39 +0000)
servers/slapd/sets.c

index dc1bc858434a29dc802156c1bbd2e89589f834de..3393e83bf3c3a17df4b1ce645615b23b99a7e63d 100644 (file)
@@ -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;