Bladeren bron

610281 - fix coverity Defect Type: Control flow issues

https://bugzilla.redhat.com/show_bug.cgi?id=610281

11798 DEADCODE Triaged Unassigned Bug Moderate Fix Required
cb_sasl_bind_once_s() ds/ldap/servers/plugins/chainingdb/cb_bind.c

Comment:
This is not a DEADCODE problem, but a half-baked implementation
considering this comment:
190 /* realloc matcheddn & errmsg because the mem alloc model */
191 /* may differ from malloc
The author intended this:
184 rc = ldap_parse_result( ld, result, status, &matcheddnp2, &errmsgp2,
185                         &referrals, resctrlsp, 1 );
Noriko Hosoi 15 jaren geleden
bovenliggende
commit
92bf4eb29d
1 gewijzigde bestanden met toevoegingen van 1 en 1 verwijderingen
  1. 1 1
      ldap/servers/plugins/chainingdb/cb_bind.c

+ 1 - 1
ldap/servers/plugins/chainingdb/cb_bind.c

@@ -181,7 +181,7 @@ cb_sasl_bind_once_s( cb_conn_pool *pool, char *dn, int method, char * mechanism,
 	char * matcheddnp2, * errmsgp2;
 	matcheddnp2=errmsgp2=NULL;
 	*resctrlsp=NULL;
-        rc = ldap_parse_result( ld, result, status, matcheddnp, errmsgp,
+        rc = ldap_parse_result( ld, result, status, &matcheddnp2, &errmsgp2,
                 &referrals, resctrlsp, 1 );
         if ( referrals != NULL ) {
             *refurlsp = referrals2berval( referrals );