summaryrefslogtreecommitdiffstats
path: root/ldap/servers/slapd/back-ldbm
diff options
context:
space:
mode:
authorEndi S. Dewata <edewata@redhat.com>2010-07-01 23:50:57 -0500
committerNoriko Hosoi <nhosoi@redhat.com>2010-08-23 11:05:23 -0700
commitfdd0c5f453fe368f2a8732bb0ae16bd68d6b5b13 (patch)
tree4991ecb44d2db41a1babb0dd1c14b466b51794ce /ldap/servers/slapd/back-ldbm
parenta3238ff1aa74aba2c3fd28c9b903db22ef9060e0 (diff)
downloadds-fdd0c5f453fe368f2a8732bb0ae16bd68d6b5b13.tar.gz
ds-fdd0c5f453fe368f2a8732bb0ae16bd68d6b5b13.tar.xz
ds-fdd0c5f453fe368f2a8732bb0ae16bd68d6b5b13.zip
Bug 610119 - fix coverify Defect Type: Null pointer dereferences issues 12167 - 12199
https://bugzilla.redhat.com/show_bug.cgi?id=610119 Resolves: bug 610119 Bug description: Fix coverify Defect Type: Null pointer dereferences issues 12167 - 12199 Fix description: Catch possible NULL pointer in ldbm_back_modify().
Diffstat (limited to 'ldap/servers/slapd/back-ldbm')
-rw-r--r--ldap/servers/slapd/back-ldbm/ldbm_modify.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/ldap/servers/slapd/back-ldbm/ldbm_modify.c b/ldap/servers/slapd/back-ldbm/ldbm_modify.c
index a368f1c7..30a99b18 100644
--- a/ldap/servers/slapd/back-ldbm/ldbm_modify.c
+++ b/ldap/servers/slapd/back-ldbm/ldbm_modify.c
@@ -221,7 +221,14 @@ ldbm_back_modify( Slapi_PBlock *pb )
slapi_pblock_get( pb, SLAPI_TARGET_ADDRESS, &addr );
slapi_pblock_get( pb, SLAPI_MODIFY_MODS, &mods );
slapi_pblock_get( pb, SLAPI_PARENT_TXN, (void**)&parent_txn );
+
slapi_pblock_get( pb, SLAPI_OPERATION, &operation );
+ if (NULL == operation)
+ {
+ ldap_result_code = LDAP_OPERATIONS_ERROR;
+ goto error_return;
+ }
+
is_fixup_operation = operation_is_flag_set(operation, OP_FLAG_REPL_FIXUP);
is_ruv = operation_is_flag_set(operation, OP_FLAG_REPL_RUV);
inst = (ldbm_instance *) be->be_instance_info;
@@ -347,9 +354,7 @@ ldbm_back_modify( Slapi_PBlock *pb )
* before we make our last abandon check to avoid race conditions in
* the code that processes abandon operations.
*/
- if (operation) {
- operation->o_status = SLAPI_OP_STATUS_WILL_COMPLETE;
- }
+ operation->o_status = SLAPI_OP_STATUS_WILL_COMPLETE;
if ( slapi_op_abandoned( pb ) ) {
goto error_return;
}