From f2e62ea04cd854cf5f8365ecdafa03ca4380ebd2 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Mon, 9 May 2005 11:20:24 +0000 Subject: [PATCH] Fix (temporary) crash on ldbm --- servers/slapd/overlays/pcache.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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; } -- 2.39.5