mirror of
https://git.FreeBSD.org/src.git
synced 2024-11-28 08:02:54 +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 New Issue
Block a user