Actions
Bug #4495
closedoutput: threaded output coverity warning
Affected Versions:
Effort:
Difficulty:
Label:
Description
New defect(s) Reported-by: Coverity Scan
Showing 1 of 1 defect(s)
** CID 1484903: Null pointer dereferences (FORWARD_NULL)
________________________________________________________________________________________________________
*** CID 1484903: Null pointer dereferences (FORWARD_NULL)
/src/util-logopenfile.c: 349 in SCLogOpenThreadedFile()
343 goto error_exit;
344 }
345 SCLogDebug("Allocated %d file context pointers for threaded array",
346 parent_ctx->threads->slot_count);
347 int slot = 1;
348 for (; slot < parent_ctx->threads->slot_count; slot++) {
>>> CID 1484903: Null pointer dereferences (FORWARD_NULL)
>>> Passing null pointer "append" to "LogFileNewThreadedCtx", which dereferences it.
349 if (!LogFileNewThreadedCtx(parent_ctx, log_path, append, slot)) {
350 /* TODO: clear allocated entries [1, slot) */
351 goto error_exit;
352 }
353 }
354 SCMutexInit(&parent_ctx->threads->mutex, NULL);
Actions