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

fix fd, mem leak in vmm_stats_stubs.c #10

Closed
sg2342 opened this issue Mar 23, 2018 · 0 comments
Closed

fix fd, mem leak in vmm_stats_stubs.c #10

sg2342 opened this issue Mar 23, 2018 · 0 comments

Comments

@sg2342
Copy link
Contributor

sg2342 commented Mar 23, 2018

https://github.com/hannesm/albatross/blob/e48d3b345701bfddc6674b3f6fd418f05400fbc7/stats/vmm_stats_stubs.c#L100

you should

close(vm_get_device_fd(ctx));free(ctx);

here

hannesm added a commit that referenced this issue Mar 24, 2018
 - vm_open only once per vm (vmmapi_open), returning vmctx
 - get stats descriptions only once in lifetime (vmmapi_statnames)
 - close file descriptor on `remove_pid` (vmmapi_close)

vmm_stats_once: command line utility (for debugging) for stats gathering
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant