Commit c74ab03
committed
Improve error handling and memory leak prevention in filter.c
- Refactored all resource-allocating functions to free memory on error
- Added robust cleanup to filter_set, filter_user_get, filter_desc_get,
filter_ip_get, filter_port_add, filter_site_add, filter_rule_copy,
filter_macro_copy, filter_userlist_copy, filter_passsite_set,
filter_rule_translate, and related helpers
- Ensured no memory leaks occur on partial allocation failures
- Preserved logic and parsing behavior, including multi-log-action
support
Note that the possible memory leaks fixed here were not harmful, because
sslproxy exits on error in all such cases. So, these changes are for
correctness.
These changes are suggested and mostly implemented by Copilot.1 parent 5ceb705 commit c74ab03
1 file changed
+205
-87
lines changed
0 commit comments