Crash fix when not using CSV output

This commit is contained in:
Luca Deri
2020-01-19 20:50:23 +01:00
parent 812505b56b
commit 283588a37b
+1 -1
View File
@@ -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);
}