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

cpu_stats.c:223]: (error) Resource leak: f #90

Closed
dcb314 opened this issue Feb 16, 2018 · 5 comments
Closed

cpu_stats.c:223]: (error) Resource leak: f #90

dcb314 opened this issue Feb 16, 2018 · 5 comments

Comments

@dcb314
Copy link

dcb314 commented Feb 16, 2018

Source code is

       if (proc_stat_cpu < 4 || proc_stat_cpu > 5) {
            RETURN_WITH_SET_ERROR("cpu", SG_ERROR_PARSE, "cpu");
        }

Some possible duplicates:

disk_stats.c:524]: (error) Resource leak: fh
network_stats.c:608]: (error) Resource leak: f

@rehsack
Copy link
Collaborator

rehsack commented Feb 16, 2018

Can you please describe the found resource leak?

@dcb314
Copy link
Author

dcb314 commented Feb 16, 2018

I am not sure what you are asking for, but the solution
might be a call to fclose( f), inside the if.

@rehsack
Copy link
Collaborator

rehsack commented Feb 16, 2018

I ask for the resource you found leaking. Since I do a bit more than libstatgrab, I do not have all the source code in mind and the earlier I understand a problem the higher the fix priority is rated ;)

@dcb314
Copy link
Author

dcb314 commented Feb 16, 2018

??

Source code file libstatgrab-0.91/src/libstatgrab/cpu_stats.c, line number 223.

My apologies for assuming that you know all the filenames of all the projects you support.

@rehsack
Copy link
Collaborator

rehsack commented Feb 16, 2018

Thanks for the report.
We will analyze it as soon as possible and release an appropriate fix.

rehsack added a commit to rehsack/libstatgrab that referenced this issue Nov 11, 2018
Fix found memory leaks reported via libstatgrab#90

Signed-off-by: Jens Rehsack <sno@netbsd.org>
tdb pushed a commit to tdb/libstatgrab that referenced this issue Nov 12, 2018
Fix found memory leaks reported via libstatgrab#90

Signed-off-by: Jens Rehsack <sno@netbsd.org>
rehsack added a commit to rehsack/libstatgrab that referenced this issue Nov 14, 2018
Fix found memory leaks reported via libstatgrab#90

Signed-off-by: Jens Rehsack <sno@netbsd.org>
tdb pushed a commit to tdb/libstatgrab that referenced this issue Nov 14, 2018
Fix found memory leaks reported via libstatgrab#90

Signed-off-by: Jens Rehsack <sno@netbsd.org>
tdb pushed a commit to tdb/libstatgrab that referenced this issue Nov 14, 2018
Fix found memory leaks reported via libstatgrab#90

Signed-off-by: Jens Rehsack <sno@netbsd.org>
@tdb tdb closed this as completed Nov 14, 2018
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

3 participants