unix socket: fix valgrind issue

This patch fixes the following issue reported by valgrind:
 31 errors in context 1 of 1:
 Conditional jump or move depends on uninitialised value(s)
    at 0x8AB2F8: UnixSocketPcapFilesCheck (runmode-unix-socket.c:279)
    by 0x97725D: UnixCommandBackgroundTasks (unix-manager.c:368)
    by 0x97BC52: UnixManagerThread (unix-manager.c:884)
    by 0x6155F6D: start_thread (pthread_create.c:311)
    by 0x6E3A9CC: clone (clone.S:113)

The running field in PcapCommand was not initialized.
pull/1001/head
Eric Leblond 11 years ago committed by Victor Julien
parent a33d1e28e9
commit 09fd7060ec

@ -382,6 +382,7 @@ int RunModeUnixSocketSingle(DetectEngineCtx *de_ctx)
}
pcapcmd->de_ctx = de_ctx;
TAILQ_INIT(&pcapcmd->files);
pcapcmd->running = 0;
pcapcmd->currentfile = NULL;
UnixManagerThreadSpawn(de_ctx, 1);

Loading…
Cancel
Save