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

(ITS#5775) Statslog prints a DN for an entry that has been released in slap_send_search_entry()

Full_Name: David Hawes
Version: 2.4.12
OS: Debian GNU/Linux 4.0
Submission from: (NULL) (

slap_send_search_entry() prints out some logging messages at result.c:1228 which
includes the DN of the entry being sent.  The entry is previously released on
line 1202.  

If no overlays are configured, the DN in the log message is printed correctly.

If, however, an overlay makes a copy (with entry_dup()) of the entry that is
being sent, the DN printed out will be garbled or empty.  Moving the block of
code at line 1201 below the Statslog line will cause the DN to be printed

I initially noticed this with some custom overlays, but it is easy to reproduce
with the valsort overlay.  Simple enable the overlay and search for an entry
that will cause valsort to call entry_dup(), and look for the log message.