summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNoriko Hosoi <nhosoi@redhat.com>2010-07-02 11:35:42 -0700
committerNoriko Hosoi <nhosoi@redhat.com>2010-07-23 13:21:58 -0700
commit110546612d0e004363cee2dc77fd451967940ebc (patch)
treeff227ca82a6d604358b243b76a36f8e54755e04a
parent92bf4eb29d084d72ab55c09f830f62fd4aadce2d (diff)
downloadds-110546612d0e004363cee2dc77fd451967940ebc.tar.gz
ds-110546612d0e004363cee2dc77fd451967940ebc.tar.xz
ds-110546612d0e004363cee2dc77fd451967940ebc.zip
610281 - fix coverity Defect Type: Control flow issues
https://bugzilla.redhat.com/show_bug.cgi?id=610281 11800 DEADCODE Triaged Unassigned Bug Minor Fix Required cos_cache_add_defn() ds/ldap/servers/plugins/cos/cos_cache.c Comment: If theDef points to the allocated memory at the line 1410, ret never becomes -1. Thus, theDef never be non-NULL at 1497. Removing 1497 if(theDef) 1498 slapi_ch_free((void**)&theDef); 11801 DEADCODE Triaged Unassigned Bug Minor Fix Required cos_cache_follow_pointer() ds/ldap/servers/plugins/cos/cos_cache.c Comment: default is not needed: 3525 default: 3526 goto bail;
-rw-r--r--ldap/servers/plugins/cos/cos_cache.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/ldap/servers/plugins/cos/cos_cache.c b/ldap/servers/plugins/cos/cos_cache.c
index bc79ee5c..89902f84 100644
--- a/ldap/servers/plugins/cos/cos_cache.c
+++ b/ldap/servers/plugins/cos/cos_cache.c
@@ -1494,8 +1494,6 @@ static int cos_cache_add_defn(
cos_cache_del_attrval_list(spec);
if(pAttrs)
cos_cache_del_attrval_list(pAttrs);
- if(theDef)
- slapi_ch_free((void**)&theDef);
}
LDAPDebug( LDAP_DEBUG_TRACE, "<-- cos_cache_add_defn\n",0,0,0);
@@ -3521,9 +3519,6 @@ static int cos_cache_follow_pointer( vattr_context *c, const char *dn, char *typ
/* this must be a compare op */
ret = slapi_vattr_value_compare_sp(c, pEntryList[0],type, test_this, result, flags);
break;
-
- default:
- goto bail;
}
}
}