]> git.sur5r.net Git - openldap/commitdiff
ITS#3765 don't allocate cache for empty IDLs
authorHoward Chu <hyc@openldap.org>
Sat, 11 Jun 2005 19:12:49 +0000 (19:12 +0000)
committerHoward Chu <hyc@openldap.org>
Sat, 11 Jun 2005 19:12:49 +0000 (19:12 +0000)
servers/slapd/back-bdb/idl.c

index e3a2f26c49bc0ccf19dddf7edb4529f05fd16a53..c00ba93235fc57eda585dd8dfaeecde3651eada5 100644 (file)
@@ -332,7 +332,7 @@ bdb_idl_cache_put(
        ee = (bdb_idl_cache_entry_t *) ch_malloc(
                sizeof( bdb_idl_cache_entry_t ) );
        ee->db = db;
-       if ( rc == DB_NOTFOUND) {
+       if ( rc == DB_NOTFOUND || BDB_IDL_IS_ZERO( ids )) {
                ee->idl = NULL;
        } else {
                ee->idl = (ID*) ch_malloc( BDB_IDL_SIZEOF ( ids ) );