From 655b6acad9e93abe2cd551d0d2d73a0cba80802a Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Mon, 19 Apr 2010 15:32:02 +0200 Subject: [PATCH] Flush fp to be sure before closing. --- src/tm-modules.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/tm-modules.c b/src/tm-modules.c index cbf079099f..760cef0838 100644 --- a/src/tm-modules.c +++ b/src/tm-modules.c @@ -73,6 +73,7 @@ int LogFileFreeCtx(LogFileCtx *lf_ctx) if (lf_ctx->fp != NULL) { SCMutexLock(&lf_ctx->fp_mutex); + fflush(lf_ctx->fp); fclose(lf_ctx->fp); SCMutexUnlock(&lf_ctx->fp_mutex); }