Explorar o código

Bug 630097 - (cov#15463) Remove NULL check in referint plugin

Coverity believes that search_result_pb can be NULL since we check
if it is NULL before freeing the internal search results.  If this
was true, there would be a NULL dereference issue when we call
slapi_pblock_get().  We are guaranteed that search_result_pb is
non-NULL after slapi_pblock_new() is called since the server would
exit if it was unable to allocate memory.

We should remove the NULL check before freeing the internal search
results.
Nathan Kinder %!s(int64=15) %!d(string=hai) anos
pai
achega
30d6b1ea5c
Modificáronse 1 ficheiros con 1 adicións e 3 borrados
  1. 1 3
      ldap/servers/plugins/referint/referint.c

+ 1 - 3
ldap/servers/plugins/referint/referint.c

@@ -769,9 +769,7 @@ update_integrity(char **argv, char *origDN,
                 slapi_ch_free_string(&filter);
             }
   
-            if (search_result_pb) {
-                slapi_free_search_results_internal(search_result_pb);
-            }
+            slapi_free_search_results_internal(search_result_pb);
         }
     }
     /* if got here, then everything good rc = 0 */