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

reference through null pointer and memory leak (related to ITS#7588)

Full_Name: John Hardin
Version: master
OS: Centos 6.4
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (

The commit for ITS#7588 causes a crash if next_node is NULL:

        /* Set the first entry to send for the next page */
        so->so_tree = next_node;
+       next_node->avl_left = NULL;

next_node will be NULL if all entries have been sent, or if slapd_shutdown is

Another issue related to ITS#7588 is a memory leak when a sorted search with
paged results is aborted. This may be because so->so_tree is not the root of the
tree when free_sort_op() calls tavl_free().