Minor cleanup (coverity)

This commit is contained in:
Howard Chu 2015-01-14 17:47:44 +00:00
parent fccca0ead9
commit 59ee92213b
3 changed files with 6 additions and 12 deletions

View File

@ -1648,6 +1648,7 @@ err_pr:;
|| META_BACK_ONERR_STOP( mi ) )
{
const char *save_text = rs->sr_text;
got_err:
savepriv = op->o_private;
op->o_private = (void *)i;
rs->sr_text = candidates[ i ].sr_text;
@ -1656,24 +1657,15 @@ err_pr:;
op->o_private = savepriv;
ldap_msgfree( res );
res = NULL;
ldap_controls_free( ctrls );
goto finish;
}
break;
default:
candidates[ i ].sr_err = rs->sr_err;
if ( META_BACK_ONERR_STOP( mi ) ) {
const char *save_text = rs->sr_text;
savepriv = op->o_private;
op->o_private = (void *)i;
rs->sr_text = candidates[ i ].sr_text;
send_ldap_result( op, rs );
rs->sr_text = save_text;
op->o_private = savepriv;
ldap_msgfree( res );
res = NULL;
goto finish;
}
if ( META_BACK_ONERR_STOP( mi ) )
goto got_err;
break;
}

View File

@ -622,6 +622,7 @@ backsql_load_schema_map( backsql_info *bi, SQLHDBC dbh )
Debug( LDAP_DEBUG_TRACE, "backsql_load_schema_map(): "
"unable to parse id=\"%s\"\n",
oc_row.cols[ 0 ], 0, 0 );
ch_free( oc_map );
return LDAP_OTHER;
}

View File

@ -528,6 +528,7 @@ slap_tool_init(
case SLAPCAT:
case SLAPSCHEMA:
/* dump subtree */
ch_free( subtree );
subtree = ch_strdup( optarg );
break;
}