Project

General

Profile

Actions

Bug #4699

closed

coverity warnings after output changes

Added by Victor Julien about 1 year ago. Updated 8 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Affected Versions:
Effort:
Difficulty:
Label:

Description

** CID 1492164:  Null pointer dereferences  (REVERSE_INULL)
/src/output-json.c: 1248 in OutputJsonInitCtx()

________________________________________________________________________________________________________
*** CID 1492164:  Null pointer dereferences  (REVERSE_INULL)
/src/output-json.c: 1248 in OutputJsonInitCtx()
1242         return result;
1243     
1244     error_exit:
1245         if (json_ctx->file_ctx) {
1246             LogFileFreeCtx(json_ctx->file_ctx);
1247         }
>>>     CID 1492164:  Null pointer dereferences  (REVERSE_INULL)
>>>     Null-checking "json_ctx" suggests that it may be null, but it has already been dereferenced on all paths leading to the check.
1248         if (json_ctx) {
1249             SCFree(json_ctx);
1250         }
1251         if (output_ctx) {
1252             SCFree(output_ctx);
1253         }

** CID 1492163:  Null pointer dereferences  (REVERSE_INULL)
/src/output-json.c: 1245 in OutputJsonInitCtx()

________________________________________________________________________________________________________
*** CID 1492163:  Null pointer dereferences  (REVERSE_INULL)
/src/output-json.c: 1245 in OutputJsonInitCtx()
1239     
1240         result.ctx = output_ctx;
1241         result.ok = true;
1242         return result;
1243     
1244     error_exit:
>>>     CID 1492163:  Null pointer dereferences  (REVERSE_INULL)
>>>     Null-checking "json_ctx->file_ctx" suggests that it may be null, but it has already been dereferenced on all paths leading to the check.
1245         if (json_ctx->file_ctx) {
1246             LogFileFreeCtx(json_ctx->file_ctx);
1247         }
1248         if (json_ctx) {
1249             SCFree(json_ctx);
1250         }
Actions #1

Updated by Jeff Lucovsky about 1 year ago

  • Status changed from Assigned to In Progress
Actions #2

Updated by Jeff Lucovsky about 1 year ago

  • Status changed from In Progress to In Review
Actions #3

Updated by Jeff Lucovsky 8 months ago

  • Status changed from In Review to Closed
Actions

Also available in: Atom PDF