فهرست منبع

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 */