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
Unknown Object (File)
Sat, Feb 7, 4:44 PM
Unknown Object (File)
Fri, Jan 23, 3:47 AM
Unknown Object (File)
Thu, Jan 22, 10:58 PM
Unknown Object (File)
Wed, Jan 14, 11:46 AM
Unknown Object (File)
Mon, Jan 12, 10:48 AM
Unknown Object (File)
Jan 10 2026, 4:25 PM
Unknown Object (File)
Dec 27 2025, 2:49 PM
Unknown Object (File)
Dec 25 2025, 4:38 AM
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 Skipped
Unit
Tests Skipped

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.