mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-24 00:29:35 -05:00
make sure NULL pointers are not dereferenced
This commit is contained in:
parent
9447b9fff4
commit
23c766bbfd
2 changed files with 7 additions and 1 deletions
|
|
@ -840,6 +840,8 @@ meta_back_op_result(
|
|||
*save_rmatch = NULL;
|
||||
void *rmatch_ctx = NULL;
|
||||
|
||||
assert( mc != NULL );
|
||||
|
||||
if ( candidate != META_TARGET_NONE ) {
|
||||
metasingleconn_t *msc = &mc->mc_conns[ candidate ];
|
||||
|
||||
|
|
|
|||
|
|
@ -800,7 +800,11 @@ really_bad:;
|
|||
/*
|
||||
* FIXME: need a better strategy to handle errors
|
||||
*/
|
||||
rc = meta_back_op_result( mc, op, rs, META_TARGET_NONE );
|
||||
if ( mc ) {
|
||||
rc = meta_back_op_result( mc, op, rs, META_TARGET_NONE );
|
||||
} else {
|
||||
rc = rs->sr_err;
|
||||
}
|
||||
goto finish;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue