Page MenuHomeFreeBSD

Fix a memory leak in bluetooth/hccontrol

Authored by on Mar 3 2017, 5:34 PM.



hccontrol.c socket_open
When the input parameter node is NULL, memory is allocated to it.
To later free the memory, introduce a new variable lnode to track when this happens.

Test Plan

Run clang's static analyzer, scan-build, to find the problem and then later to show it has been resolved

Diff Detail

rS FreeBSD src repository
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline retitled this revision from to Fix a memory leak in bluetooth/hccontrol. updated this object. edited the test plan for this revision. (Show Details) added reviewers: stevek, takawata. set the repository for this revision to rS FreeBSD src repository.
emax accepted this revision.Mar 5 2017, 7:35 PM
emax edited edge metadata.
This revision is now accepted and ready to land.Mar 5 2017, 7:35 PM
This revision was automatically updated to reflect the committed changes.