Bug 540521
| Summary: | netcf_close is not free'ing the netlink handle | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Daniel Berrangé <berrange> | ||||
| Component: | netcf | Assignee: | David Lutterkort <lutter> | ||||
| Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
| Severity: | medium | Docs Contact: | |||||
| Priority: | low | ||||||
| Version: | 12 | CC: | hbrock, lutter | ||||
| Target Milestone: | --- | ||||||
| Target Release: | --- | ||||||
| Hardware: | All | ||||||
| OS: | Linux | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | 0.1.5-1.fc12 | Doc Type: | Bug Fix | ||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2009-12-18 04:33:22 UTC | Type: | --- | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Embargoed: | |||||||
| Bug Depends On: | |||||||
| Bug Blocks: | 540330 | ||||||
| Attachments: |
|
||||||
Created attachment 373139 [details]
Fix free'ing of netlink handle
Cool - saves me from firing up valgrind. Patch committed upstream. netcf-0.1.5-1.fc12 has been pushed to the Fedora 12 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing update netcf'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F12/FEDORA-2009-12472 netcf-0.1.5-1.fc12 has been pushed to the Fedora 12 stable repository. If problems still persist, please make note of it in this bug report. |
Description of problem: valgrind is showing a memory leak from the netlink_init() callpath. Looking at the corresponding netlink-close() method in netcf, it appears it is merely closing the socket, and not free'ing the memory for the libnl handle. Version-Release number of selected component (if applicable): 0.1.4 How reproducible: Always Steps to Reproduce: 1. Run this test program under valgrind #include <netcf.h> #include <stdio.h> int main(int argc, char **argv) { for (int i = 0 ; i < 1000000 ; i++) { struct netcf *netcf = NULL; ncf_init(&netcf, NULL); if (netcf != NULL) { ncf_close(netcf); } } return 0; } 2. Compile and run that as root 3. Actual results: Expected results: Additional info: