libpfctl: fix memory leak in pfctl_get_status()

Remember to also free ncounters.

Fixes:		c00aca9a71 ("pf: Show pf fragment reassembly counters.")
MFC after:	3 days
Sponsored by:	Rubicon Communications, LLC ("Netgate")
This commit is contained in:
Kristof Provost
2025-10-01 11:41:25 +02:00
parent cf58399728
commit bdb205c53e
+4
View File
@@ -561,6 +561,10 @@ pfctl_free_status(struct pfctl_status *status)
free(c->name);
free(c);
}
TAILQ_FOREACH_SAFE(c, &status->ncounters, entry, tmp) {
free(c->name);
free(c);
}
free(status);
}