mirror of
https://github.com/BlackLight/Snort_AIPreproc.git
synced 2024-12-26 19:25:10 +01:00
Fixing a tiny memory leak in DOT generation
This commit is contained in:
parent
04d4cc378f
commit
2443ff21fa
1 changed files with 5 additions and 1 deletions
|
@ -112,8 +112,9 @@ __AI_correlated_alerts_to_dot ( AI_alert_correlation *corr, FILE *fp )
|
||||||
snprintf ( dst_port2, sizeof ( dst_port2 ), "%d", ntohs ( corr->key.b->tcp_dst_port ));
|
snprintf ( dst_port2, sizeof ( dst_port2 ), "%d", ntohs ( corr->key.b->tcp_dst_port ));
|
||||||
|
|
||||||
time1 = strdup ( ctime ( &(corr->key.a->timestamp )) );
|
time1 = strdup ( ctime ( &(corr->key.a->timestamp )) );
|
||||||
time2 = strdup ( ctime ( &(corr->key.b->timestamp )) );
|
|
||||||
time1[strlen(time1)-1] = 0;
|
time1[strlen(time1)-1] = 0;
|
||||||
|
|
||||||
|
time2 = strdup ( ctime ( &(corr->key.b->timestamp )) );
|
||||||
time2[strlen(time2)-1] = 0;
|
time2[strlen(time2)-1] = 0;
|
||||||
|
|
||||||
fprintf ( fp,
|
fprintf ( fp,
|
||||||
|
@ -137,6 +138,9 @@ __AI_correlated_alerts_to_dot ( AI_alert_correlation *corr, FILE *fp )
|
||||||
time2,
|
time2,
|
||||||
corr->key.b->grouped_alerts_count
|
corr->key.b->grouped_alerts_count
|
||||||
);
|
);
|
||||||
|
|
||||||
|
free ( time1 );
|
||||||
|
free ( time2 );
|
||||||
} /* ----- end of function __AI_correlated_alerts_to_dot ----- */
|
} /* ----- end of function __AI_correlated_alerts_to_dot ----- */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue