Skip to content

fix: added socket closing to prevent resource leak#402

Merged
guelfey merged 1 commit intogodbus:masterfrom
aiburegit:triage
Nov 14, 2025
Merged

fix: added socket closing to prevent resource leak#402
guelfey merged 1 commit intogodbus:masterfrom
aiburegit:triage

Conversation

@aiburegit
Copy link

Detected by static analyzer that socket is not closed after use,
which can lead to resource leak and potential vulnerabilities such as
file descriptor exhaustion or denial of service (DoS) attacks.

Changes:
- Added `socket.Close()` call after finishing work with socket.
- Ensured that socket is closed even in case of errors while writing data.

This fix improves stability and security of code.

    Detected by static analyzer that socket is not closed after use,
    which can lead to resource leak and potential vulnerabilities such as
    file descriptor exhaustion or denial of service (DoS) attacks.

    Changes:
    - Added `socket.Close()` call after finishing work with socket.
    - Ensured that socket is closed even in case of errors while writing data.

    This fix improves stability and security of code.
Copy link
Member

@guelfey guelfey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@guelfey guelfey merged commit 450a4fb into godbus:master Nov 14, 2025
7 checks passed
This was referenced Nov 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants