Bug: Server leaks Config in non-multithreaded handler path #158
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Description
In the server handler (
src/server/server.c:77-113), the multithreading path frees theConfigviapipeline_context_receiver_destroy(), but the non-multithreading path callsreceive_files(config, file_descriptor)and then falls through toclose(file_descriptor)without ever freeingconfig. Every non-multithreaded TCP or SSH connection leaks the entire received configuration.This is also reachable in
--stdiomode, which is the SSH transport path and therefore leaks once per SSH invocation.Location
src/server/server.c:111—receive_files(config, file_descriptor);is called without a matchingconfig_delete(config).src/server/server.c:109— multithreading path correctly destroys the context.Suggested fix
config_delete(config);after the non-multithreadedreceive_files()call.Severity
High
Category
bug
This issue was automatically generated by the issue-creator agent.