From ea01c960f0f32bead97fc3615c73f2cc3c4faba8 Mon Sep 17 00:00:00 2001 From: Mark Reynolds Date: Dec 08 2014 15:05:43 +0000 Subject: Ticket 47969 - Fix coverity issue Description: Fix coverity issue 12948 & 12949 (NULL pointer dereference) https://fedorahosted.org/389/ticket/47969 Reviewed by: mreynolds (cherry picked from commit 1553b665bfecbbccd54c439442d9a22c5d35d4a1) --- diff --git a/ldap/servers/plugins/cos/cos_cache.c b/ldap/servers/plugins/cos/cos_cache.c index db34d15..10f475e 100644 --- a/ldap/servers/plugins/cos/cos_cache.c +++ b/ldap/servers/plugins/cos/cos_cache.c @@ -1906,9 +1906,9 @@ static void cos_cache_del_schema(cosCache *pCache) cos_cache_del_attrval_list(&(pCache->ppAttrIndex[attr_index]->pObjectclasses)); } } + /* Finally, remove the first attribute's objectclass list */ + cos_cache_del_attrval_list(&(pCache->ppAttrIndex[0]->pObjectclasses)); } - /* Finally, remove the first attribute's objectclass list */ - cos_cache_del_attrval_list(&(pCache->ppAttrIndex[0]->pObjectclasses)); LDAPDebug( LDAP_DEBUG_TRACE, "<-- cos_cache_del_schema\n",0,0,0); }