Преглед на файлове

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 преди 15 години
родител
ревизия
30d6b1ea5c
променени са 1 файла, в които са добавени 1 реда и са изтрити 3 реда
  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 */