From ece8e5444bd4ba3d3293df79da415cf0f9d77259 Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Thu, 19 May 2011 10:15:03 +0200 Subject: [PATCH] Minor profiling fix: don't close stdout. --- src/util-profiling.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/util-profiling.c b/src/util-profiling.c index 64af940cd4..d30fa2c25a 100644 --- a/src/util-profiling.c +++ b/src/util-profiling.c @@ -418,7 +418,8 @@ SCProfilingDump(void) } fprintf(fp,"\n"); - fclose(fp); + if (fp != stdout) + fclose(fp); SCLogInfo("Done dumping profiling data."); } @@ -531,7 +532,7 @@ ProfilingTest01(void) if (rules_pca->head[counter1].wrapped_syncs != 0) return 0; - SCProfilingDump(stdout); + SCProfilingDump(); SCProfilingDestroy();