diff options
author | Luca Deri <deri@ntop.org> | 2020-01-19 20:50:23 +0100 |
---|---|---|
committer | Luca Deri <deri@ntop.org> | 2020-01-19 20:50:23 +0100 |
commit | 283588a37b313973d86fa04f821c0f071e26349b (patch) | |
tree | 1cfeaaccbfc7ae32f5063c474041c40defec144d | |
parent | 812505b56bb4508bc42e1615d6425ad26444d3f8 (diff) |
Crash fix when not using CSV output
-rw-r--r-- | example/ndpiReader.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/example/ndpiReader.c b/example/ndpiReader.c index 908afb176..af685f4c7 100644 --- a/example/ndpiReader.c +++ b/example/ndpiReader.c @@ -1138,7 +1138,7 @@ static void printFlow(u_int16_t id, struct ndpi_flow_info *flow, u_int16_t threa if(enable_joy_stats) { /* Print entropy values for monitored flows. */ flowGetBDMeanandVariance(flow); - fprintf(csv_fp, "\n"); + if(csv_fp) fprintf(csv_fp, "\n"); fflush(out); fprintf(out, "[score: %.4f]", flow->entropy.score); } |