aboutsummaryrefslogtreecommitdiff
path: root/src/feature/stats/predict_ports.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/feature/stats/predict_ports.c')
-rw-r--r--src/feature/stats/predict_ports.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/feature/stats/predict_ports.c b/src/feature/stats/predict_ports.c
index 8abf34f50f..ebf4a42468 100644
--- a/src/feature/stats/predict_ports.c
+++ b/src/feature/stats/predict_ports.c
@@ -303,6 +303,8 @@ predicted_ports_init(void)
void
predicted_ports_free_all(void)
{
+ if (!predicted_ports_list)
+ return;
predicted_ports_total_alloc -=
smartlist_len(predicted_ports_list)*sizeof(predicted_port_t);
SMARTLIST_FOREACH(predicted_ports_list, predicted_port_t *,