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

memory leak #103

Closed
jsho000 opened this issue Mar 21, 2024 · 2 comments
Closed

memory leak #103

jsho000 opened this issue Mar 21, 2024 · 2 comments

Comments

@jsho000
Copy link

jsho000 commented Mar 21, 2024

In the following code:

      int read_bytes = util::read_atmost_n(
                                  fdopen(err_rd_pipe, "r"),
                                  err_buf,
                                  SP_MAX_ERR_BUF_SIZ);
      close(err_rd_pipe);

The value returned by fdopen() is not closed. This causes memory leak.
If you call fclose(), it will close err_rd_pipe. So close(err_rd_pipe) is not necessary.

@arun11299
Copy link
Owner

@jsho000 Thank you for reporting. Can you provide a PR after testing the required changes ?

@arun11299
Copy link
Owner

Will be fixed with #104

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

No branches or pull requests

2 participants