Project

General

Profile

Actions

Bug #3817

closed
JL JL

Coverity scan issue -- resource leak in filestore output logger

Bug #3817: Coverity scan issue -- resource leak in filestore output logger

Added by Jeff Lucovsky almost 6 years ago. Updated over 5 years ago.

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

Description

** CID 1465222:  Resource leaks  (RESOURCE_LEAK)
/src/output-filestore.c: 182 in OutputFilestoreFinalizeFiles()

________________________________________________________________________________________________________
*** CID 1465222:  Resource leaks  (RESOURCE_LEAK)
/src/output-filestore.c: 182 in OutputFilestoreFinalizeFiles()
176                     FILE *out = fopen(js_metadata_filename, "w");
177                     if (out != NULL) {
178                         size_t js_len = jb_len(js_fileinfo);
179                         fwrite(jb_ptr(js_fileinfo), js_len, 1, out);
180                     }
181                     jb_free(js_fileinfo);
>>>     CID 1465222:  Resource leaks  (RESOURCE_LEAK)
>>>     Variable "out" going out of scope leaks the storage it points to.
182                 }
183             }
184         }
185     }
186     187     static int OutputFilestoreLogger(ThreadVars *tv, void
*thread_data,

VJ Updated by Victor Julien over 5 years ago Actions #1

  • Target version set to 6.0.0beta1

JL Updated by Jeff Lucovsky over 5 years ago Actions #2

  • Status changed from Assigned to In Review

JL Updated by Jeff Lucovsky over 5 years ago Actions #3

  • Status changed from In Review to Closed
Actions

Also available in: PDF Atom