Browse Source

Ticket #48048 - Fix coverity issues - 2015/2/24

Coverity defect 13049 - Explicit null dereferenced (FORWARD_NULL)
Description:  Added NULL check for be.
modified: retrocl_postob in retrocl_po.c
Noriko Hosoi 10 years ago
parent
commit
500e8be081
1 changed files with 4 additions and 0 deletions
  1. 4 0
      ldap/servers/plugins/retrocl/retrocl_po.c

+ 4 - 0
ldap/servers/plugins/retrocl/retrocl_po.c

@@ -597,6 +597,10 @@ int retrocl_postob (Slapi_PBlock *pb, int optype)
      */
    
     (void)slapi_pblock_get( pb, SLAPI_BACKEND, &be );
+    if (be == NULL) {
+        LDAPDebug0Args(LDAP_DEBUG_ANY, "retrocl_postob: backend is not set\n");
+        return SLAPI_PLUGIN_FAILURE;
+    }
     
     if (slapi_be_logchanges(be) == 0) {
         LDAPDebug0Args(LDAP_DEBUG_TRACE,"not applying change if not logging\n");