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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user