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

Re: complex searches with filters: more memory leaks and an id list issue



Thomas,

(I'm CC'ing to -devel, because apparently you mailed directly to openldap-bugs
instead of submitting an ITS).

Your fixes (those to filterindex.c) are not really affecting the operations, 
because key_read cannot fail (in the current implementation); however
there's something tricky: the pointer is not reset neither by the
caller or by the callee, so in case of failure one should count on
the exit status to ignore the pointer. Your fix, if triggered, would cause
a dangling pointer (a non-initialized tmp) to be erroneously freed.

The fix in filter.c is also redundant because free does nothing 
on a NULL pointer (see free(3)); all you save is a function call
(which is good) but the code behaves correctly.

I'm not able to judge the fix in idl.c.

Pierangelo.