From 49b1729ad72b46c18809460b92406fbedd29d6db Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Mon, 19 Oct 2009 23:41:11 +0000 Subject: [PATCH] don't dereference pointer in case of error --- servers/slapd/back-bdb/monitor.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/servers/slapd/back-bdb/monitor.c b/servers/slapd/back-bdb/monitor.c index a333c2132d..598ca6a191 100644 --- a/servers/slapd/back-bdb/monitor.c +++ b/servers/slapd/back-bdb/monitor.c @@ -280,8 +280,9 @@ bdb_monitor_initialize( void ) Debug( LDAP_DEBUG_ANY, LDAP_XSTRING(bdb_monitor_initialize) ": register_at failed\n", 0, 0, 0 ); + } else { + (*s_at[ i ].ad)->ad_type->sat_flags |= SLAP_AT_HIDE; } - (*s_at[ i ].ad)->ad_type->sat_flags |= SLAP_AT_HIDE; } for ( i = 0; s_oc[ i ].desc != NULL; i++ ) { @@ -290,8 +291,9 @@ bdb_monitor_initialize( void ) Debug( LDAP_DEBUG_ANY, LDAP_XSTRING(bdb_monitor_initialize) ": register_oc failed\n", 0, 0, 0 ); + } else { + (*s_oc[ i ].oc)->soc_flags |= SLAP_OC_HIDE; } - (*s_oc[ i ].oc)->soc_flags |= SLAP_OC_HIDE; } return 0; -- 2.39.5