Page MenuHomeFreeBSD

Fix a memory leak in bluetooth/hccontrol
ClosedPublic

Authored by trix_juniper.net on Mar 3 2017, 5:34 PM.
Tags
None
Referenced Files
F83687591: D9878.diff
Mon, May 13, 4:01 PM
Unknown Object (File)
Mon, May 6, 11:36 PM
Unknown Object (File)
Mar 28 2024, 9:07 AM
Unknown Object (File)
Mar 13 2024, 5:32 PM
Unknown Object (File)
Dec 20 2023, 2:38 AM
Unknown Object (File)
Oct 25 2023, 9:58 AM
Unknown Object (File)
Aug 20 2023, 9:50 PM
Unknown Object (File)
Aug 14 2023, 4:28 PM
Subscribers

Details

Summary

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

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

trix_juniper.net retitled this revision from to Fix a memory leak in bluetooth/hccontrol.
trix_juniper.net updated this object.
trix_juniper.net edited the test plan for this revision. (Show Details)
trix_juniper.net added reviewers: stevek, takawata.
trix_juniper.net set the repository for this revision to rS FreeBSD src repository - subversion.
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.