]> git.sur5r.net Git - openldap/commitdiff
check for ee == NULL
authorPierangelo Masarati <ando@openldap.org>
Wed, 26 Sep 2007 22:37:35 +0000 (22:37 +0000)
committerPierangelo Masarati <ando@openldap.org>
Wed, 26 Sep 2007 22:37:35 +0000 (22:37 +0000)
servers/slapd/back-bdb/idl.c

index 044f2a0d4cee1d9b78421a7d687cd7efd86f0261..dad12bf56186af7dcb28f0460e38648fdbe6d3bb 100644 (file)
@@ -379,7 +379,7 @@ bdb_idl_cache_put(
        if ( ++bdb->bi_idl_cache_size > bdb->bi_idl_cache_max_size ) {
                int i;
                ee = bdb->bi_idl_lru_tail;
-               for ( i = 0; i < 10; i++, ee = eprev ) {
+               for ( i = 0; ee != NULL && i < 10; i++, ee = eprev ) {
                        eprev = ee->idl_lru_prev;
                        if ( eprev == ee ) {
                                eprev = NULL;