Page MenuHomeFreeBSD

libpfctl: memory leak fix
ClosedPublic

Authored by kp on Jun 30 2021, 1:12 PM.

Details

Summary

We must remember to free the nvlist we create from the kernel's response
to DIOCGETSTATESNV, on every iteration.

MFC after: 1 week
Sponsored by: Rubicon Communications, LLC ("Netgate")

Diff Detail

Repository
rG FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

kp requested review of this revision.Jun 30 2021, 1:12 PM

Why does it depend on other reviews?
If it's part of an open review, please fix it there.
If not, please fix it regardless of the other changes.

Why does it depend on other reviews?
If it's part of an open review, please fix it there.
If not, please fix it regardless of the other changes.

It's a bug that was already present, but will be made more serious by D30948.
I've linked it to the other reviews because they all deal with the same code, and this patch likely won't apply without those other patches (although it could indeed be committed independently).

This revision is now accepted and ready to land.Jul 1 2021, 7:54 AM
This revision was automatically updated to reflect the committed changes.