Project

General

Profile

Actions

Bug #3817

closed

Coverity scan issue -- resource leak in filestore output logger

Added by Jeff Lucovsky over 4 years ago. Updated over 4 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,
Actions

Also available in: Atom PDF