Page MenuHomeFreeBSD

sbin/dhclient: fix `vendor` storage leak in parse_option_decl(..)
ClosedPublic

Authored by ngie on Mar 13 2017, 5:19 PM.
Tags
None
Referenced Files
F153190830: D9993.id26227.diff
Sun, Apr 19, 5:15 PM
Unknown Object (File)
Fri, Apr 17, 7:22 PM
Unknown Object (File)
Fri, Apr 17, 5:57 AM
Unknown Object (File)
Sun, Apr 12, 10:06 AM
Unknown Object (File)
Sat, Apr 11, 7:58 PM
Unknown Object (File)
Sat, Apr 4, 8:47 PM
Unknown Object (File)
Sun, Mar 22, 4:04 PM
Unknown Object (File)
Sun, Mar 22, 8:00 AM
Subscribers

Details

Summary

sbin/dhclient: fix vendor storage leak in parse_option_decl(..)

This ensures the storage isn't leaked when non-NULL and the function
returns early, prior to the free(vendor) later on in the function.

MFC after: 1 week
Reported by: Coverity
CID: 1007111-1007113
Sponsored by: Dell EMC Isilon

Diff Detail

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

Event Timeline

Remove goto label; free when exiting function, prior to free(vendor) on line 757 (missed
when reviewing the code previously).

This revision is now accepted and ready to land.Mar 13 2017, 5:37 PM