Page MenuHomeFreeBSD

Fix memory leaks in dhclient
ClosedPublic

Authored by trix_juniper.net on Mar 5 2017, 2:07 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Jul 17, 8:54 AM
Unknown Object (File)
Jun 29 2025, 12:32 PM
Unknown Object (File)
Jun 28 2025, 7:33 PM
Unknown Object (File)
Jun 27 2025, 6:48 PM
Unknown Object (File)
Jun 26 2025, 10:46 PM
Unknown Object (File)
Jun 26 2025, 1:29 AM
Unknown Object (File)
Jun 24 2025, 8:24 PM
Unknown Object (File)
Jun 24 2025, 9:01 AM
Subscribers

Details

Summary

parse.c parse_string
When parse_semi fails, free s before returning

parse.c parse_numeric_aggregate
The memory assigned to bufp is complicated, it can either be from the input parameter buf or allocated locally. Introduce a new variable lbufp to track when it is assigned locally and to free it when appropriate.

Test Plan

Run clang's static analyzer, scan-build, to find the problems, run later to show resolutions.

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 memory leaks in dhclient.
trix_juniper.net updated this object.
trix_juniper.net edited the test plan for this revision. (Show Details)
trix_juniper.net added reviewers: stevek, brooks, jhb.
trix_juniper.net set the repository for this revision to rS FreeBSD src repository - subversion.
jhb edited edge metadata.
This revision is now accepted and ready to land.Mar 6 2017, 5:39 PM
This revision was automatically updated to reflect the committed changes.