]> git.ipfire.org Git - thirdparty/strongswan.git/commit
whitelist: Add error handling to socket reads and fix a memory leak
authorTobias Brunner <tobias@strongswan.org>
Fri, 18 Jul 2025 10:07:45 +0000 (12:07 +0200)
committerTobias Brunner <tobias@strongswan.org>
Fri, 18 Jul 2025 10:07:45 +0000 (12:07 +0200)
commit85ebf6abd4412d241fd55bc076b60f0a87931540
tree28da379d05f15f9f08de8e48afb67418c024ed94
parent412231eecd0af2d66937968ba9ef4d233725d859
whitelist: Add error handling to socket reads and fix a memory leak

This now adds some state (basically a message buffer), but simplifies
error handling as we don't have to handle two potential failure paths
and could avoid some potential issues by still calling the blocking
read_all().

It also fixes a memory leak when clients disconnect.
src/libcharon/plugins/whitelist/whitelist_control.c