mirror of
https://github.com/freebsd/freebsd-src
synced 2024-07-22 18:56:38 +00:00
libpfctl: allow pfctl_free_status(NULL)
Mimic free() and friends, and allow free()ing of NULL. MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D41648
This commit is contained in:
parent
ddd08375c8
commit
0b01878fd0
|
@ -257,6 +257,9 @@ pfctl_free_status(struct pfctl_status *status)
|
|||
{
|
||||
struct pfctl_status_counter *c, *tmp;
|
||||
|
||||
if (status == NULL)
|
||||
return;
|
||||
|
||||
TAILQ_FOREACH_SAFE(c, &status->counters, entry, tmp) {
|
||||
free(c->name);
|
||||
free(c);
|
||||
|
|
Loading…
Reference in a new issue