[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: (ITS#4860) Sets' enhancement

jclarke@linagora.com wrote:

> Got this one: it was a double-free in sets.c occuring after a
> slap_set_join() with lset or rset empty - the non empty set was
> returned, and then freed, causing a double-free error or segfault.
> The patch attached corrects this problem on RE23 and HEAD for me and
> doesn't have any side effects on our test set. However, it may not be
> the "right" way - please correct if necessary!

It seems to work correctly, but there seems to be an easier fix: just
NULL out the pointer to lset/rset, respectively.  I'm patching the code
this way, please test if you get a chance.

Thanks, p.

Ing. Pierangelo Masarati
OpenLDAP Core Team

SysNet s.r.l.
via Dossi, 8 - 27100 Pavia - ITALIA
Office:  +39 02 23998309
Mobile:  +39 333 4963172
Email:   pierangelo.masarati@sys-net.it