]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC r300624:
authorngie <ngie@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Wed, 8 Jun 2016 18:46:10 +0000 (18:46 +0000)
committerngie <ngie@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Wed, 8 Jun 2016 18:46:10 +0000 (18:46 +0000)
commit598f827360492bc8ae36682d621435998aa4978c
treeaf654e24f8f89c3bff1339cf985d732442efe28f
parentfa67e0cb3a876b0413d475cb5fb4f8127909344e
MFC r300624:

Fix up r300385

I accidentally glossed over the fact that tmp is manipulated via strchr, so
if we tried to free `tmp` after r300385, it would have crashed.

Create a separate pointer (tmp2) to track the original allocation of `tmp`,
and free `tmp2` if `p->nc_lookups` can't be malloced

CID: 1356026

git-svn-id: svn://svn.freebsd.org/base/stable/10@301687 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
lib/libc/rpc/getnetconfig.c