]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC r315199,r315200,r315203:
authorngie <ngie@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Mon, 20 Mar 2017 03:06:41 +0000 (03:06 +0000)
committerngie <ngie@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Mon, 20 Mar 2017 03:06:41 +0000 (03:06 +0000)
commit862e72d90def759f2ac4a0a5da70e27816e222f7
tree13f6c2315c7aedd7d882328b1e0bf191287d5000
parenta5fe3b6b7856785cf8c6492cc504716399b01321
MFC r315199,r315200,r315203:

r315199:

sbin/dhclient: fix a memory leak in parse_client_lease_statement(..)

The memory stored by `lease` would have previously been leaked if an
unterminated lease declaration was found in an early-return code path.

CID: 1007114

r315200:

Fix -Wunused-but-set-warning with `ret`

While here, resolve Coverity warnings by demonstrating that vfprintf's
return value is being explicitly ignored.

Tested with: clang, gcc 4.2.1, gcc 6.3.0

r315203:

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.

CID: 1007111-1007113

git-svn-id: svn://svn.freebsd.org/base/stable/10@315610 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sbin/dhclient/clparse.c
sbin/dhclient/tests/fake.c