Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fs: fix potential memory leak on i/o errors in .read() #224

Merged
merged 1 commit into from
Sep 23, 2024

Conversation

jow-
Copy link
Owner

@jow- jow- commented Sep 23, 2024

Make sure to free the line buffer pointer when aborting a getline() / getdelim() based read operation on i/o errors.

As an example, this issue could be triggered by receiving a broken pipe error while attempting to read a line from stdin.

Make sure to free the line buffer pointer when aborting a
`getline()` / `getdelim()` based read operation on i/o errors.

As an example, this issue could be triggered by receiving a broken
pipe error while attempting to read a line from stdin.

Signed-off-by: Jo-Philipp Wich <[email protected]>
@jow- jow- merged commit 6e88c62 into master Sep 23, 2024
7 checks passed
@jow- jow- deleted the lib-fs-readline-leak branch September 23, 2024 14:39
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.

1 participant