Project

General

Profile

Actions

Bug #4495

closed

output: threaded output coverity warning

Added by Victor Julien almost 3 years ago. Updated almost 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
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

Also available in: Atom PDF