From: Howard Chu Date: Mon, 9 May 2005 11:20:24 +0000 (+0000) Subject: Fix (temporary) crash on ldbm X-Git-Tag: OPENLDAP_AC_BP~681 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=f2e62ea04cd854cf5f8365ecdafa03ca4380ebd2;p=openldap Fix (temporary) crash on ldbm --- diff --git a/servers/slapd/overlays/pcache.c b/servers/slapd/overlays/pcache.c index b6f433b5cc..1111e32294 100644 --- a/servers/slapd/overlays/pcache.c +++ b/servers/slapd/overlays/pcache.c @@ -1652,8 +1652,12 @@ pc_cfadd( Operation *op, SlapReply *rs, Entry *p, ConfigArgs *ca ) bv.bv_len = sprintf( ca->msg, "olcDatabase=%s", cm->db.bd_info->bi_type ); bv.bv_val = ca->msg; ca->be = &cm->db; - config_build_entry( op, rs, pe, ca, &bv, cm->db.bd_info->bi_cf_ocs, - &pcocs[1] ); + + /* We can only create this entry if the database is table-driven + */ + if ( cm->db.bd_info->bi_cf_ocs ) + config_build_entry( op, rs, pe, ca, &bv, cm->db.bd_info->bi_cf_ocs, + &pcocs[1] ); return 0; }