summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ldap/servers/plugins/cos/cos_cache.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/ldap/servers/plugins/cos/cos_cache.c b/ldap/servers/plugins/cos/cos_cache.c
index 8631c3d2..8c72b8ff 100644
--- a/ldap/servers/plugins/cos/cos_cache.c
+++ b/ldap/servers/plugins/cos/cos_cache.c
@@ -1387,10 +1387,18 @@ static int cos_cache_add_defn(
cosAttrValue *pDummyAttrVal = 0;
cosAttrValue *pAttrsIter = 0;
cosAttributes *pDummyAttributes = 0;
- cosAttrValue *pSpecsIter = *spec;
+ cosAttrValue *pSpecsIter = 0;
LDAPDebug( LDAP_DEBUG_TRACE, "--> cos_cache_add_defn\n",0,0,0);
+ if (!spec) {
+ LDAPDebug( LDAP_DEBUG_ANY, "missing spec\n",0,0,0);
+ ret = -1;
+ goto out;
+ }
+
+ pSpecsIter = *spec;
+
/* we don't want cosspecifiers that can be supplied by the same scheme */
while( pSpecsIter )
{
@@ -1481,7 +1489,7 @@ static int cos_cache_add_defn(
ret = -1;
}
}
-
+out:
if(ret < 0)
{
if(dn)