Skip to content

Commit

Permalink
log-filestore: suppress unused code
Browse files Browse the repository at this point in the history
Code was unused and was leaking memory.

This fixes:

Direct leak of 614240 byte(s) in 3839 object(s) allocated from:
    #0 0x4c396b in malloc (/opt/suricata-asan/bin/suricata+0x4c396b)
    #1 0x11bc12e in LogFileNewCtx /home/pmanev/sandnet-qa/stage/oisf/src/util-logopenfile.c:474:27
    #2 0xcf7ef2 in LogFilestoreLogInitCtx /home/pmanev/sandnet-qa/stage/oisf/src/log-filestore.c:430:31
    #3 0xec3275 in RunModeInitializeOutputs /home/pmanev/sandnet-qa/stage/oisf/src/runmodes.c:763:26
    #4 0xeae17f in UnixSocketPcapFilesCheck /home/pmanev/sandnet-qa/stage/oisf/src/runmode-unix-socket.c:391:9
    #5 0x109bc37 in UnixCommandBackgroundTasks /home/pmanev/sandnet-qa/stage/oisf/src/unix-manager.c:430:20
    #6 0x10a9be2 in UnixManager /home/pmanev/sandnet-qa/stage/oisf/src/unix-manager.c:977:9
    #7 0x1075643 in TmThreadsManagement /home/pmanev/sandnet-qa/stage/oisf/src/tm-threads.c:600:9
    #8 0x7fbc9fcb3181 in start_thread /build/eglibc-3GlaMS/eglibc-2.19/nptl/pthread_create.c:312
  • Loading branch information
regit committed Mar 6, 2016
1 parent e1ce796 commit 0288165
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions src/log-filestore.c
Original file line number Diff line number Diff line change
Expand Up @@ -427,12 +427,6 @@ static void LogFilestoreLogDeInitCtx(OutputCtx *output_ctx)
* */
static OutputCtx *LogFilestoreLogInitCtx(ConfNode *conf)
{
LogFileCtx *logfile_ctx = LogFileNewCtx();
if (logfile_ctx == NULL) {
SCLogDebug("Could not create new LogFilestoreCtx");
return NULL;
}

OutputCtx *output_ctx = SCCalloc(1, sizeof(OutputCtx));
if (unlikely(output_ctx == NULL))
return NULL;
Expand Down

0 comments on commit 0288165

Please sign in to comment.