]> CyberLeo.Net >> Repos - FreeBSD/stable/9.git/commit
MFstable/10 r301687:
authorngie <ngie@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Wed, 8 Jun 2016 18:47:00 +0000 (18:47 +0000)
committerngie <ngie@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Wed, 8 Jun 2016 18:47:00 +0000 (18:47 +0000)
commit3fd07942530237a038ba0d12738fa19e1a92dbea
tree872eb665659f2761259e6ca39729ccd74c1826fc
parentc839a08a714fc59647acfd90c28ed772dac648a1
MFstable/10 r301687:

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/9@301688 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
lib/libc/rpc/getnetconfig.c