Skip to content

Fixed memory leak when assessing file permissions in qhash.c#117

Merged
wolkykim merged 1 commit intowolkykim:mainfrom
OrionCummings:main
Dec 15, 2025
Merged

Fixed memory leak when assessing file permissions in qhash.c#117
wolkykim merged 1 commit intowolkykim:mainfrom
OrionCummings:main

Conversation

@OrionCummings
Copy link
Copy Markdown
Contributor

The current implementation of qhashmd5_file(...) fails to close an open file descriptor upon a failed call to fstat(...). While it's unlikely to occur as the file has just been opened, it's still good practice to clean up all allocated resources in the event of a failure.

This is my first commit to this repository. I do not see a commit style guide or commit guidelines. If I missed these guides, please let me know!

Copy link
Copy Markdown
Owner

@wolkykim wolkykim left a comment

Choose a reason for hiding this comment

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

LGTM. Thank you for the fix.

@wolkykim wolkykim merged commit f45c021 into wolkykim:main Dec 15, 2025
2 checks passed
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