From d09cd16c8c0be79c02422ffc86297709e150421a Mon Sep 17 00:00:00 2001 From: Jason Ish Date: Mon, 16 Jan 2017 10:38:08 -0600 Subject: [PATCH] template logger - fix coverity CID 1324964 null: At condition templatejs != NULL, the value of templatejs must be NULL. dead_error_condition: The condition templatejs != NULL cannot be true. 113 if (templatejs != NULL) { CID 1324964 (#1 of 1): Logically dead code (DEADCODE) dead_error_line: Execution cannot reach this statement: json_decref(templatejs);. 114 json_decref(templatejs); 115 } --- src/output-json-template.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/output-json-template.c b/src/output-json-template.c index fcbee919b9..3747121f58 100644 --- a/src/output-json-template.c +++ b/src/output-json-template.c @@ -110,9 +110,6 @@ static int JsonTemplateLogger(ThreadVars *tv, void *thread_data, return TM_ECODE_OK; error: - if (templatejs != NULL) { - json_decref(templatejs); - } json_decref(js); return TM_ECODE_FAILED; }