]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Revert r300385 and r300624 which was false positive
authorXin LI <delphij@FreeBSD.org>
Fri, 30 Jun 2017 07:04:10 +0000 (07:04 +0000)
committerXin LI <delphij@FreeBSD.org>
Fri, 30 Jun 2017 07:04:10 +0000 (07:04 +0000)
commit94c5b2d12475ef7b133a13926734a97196b98367
tree6538ff2638db9d5bff7ec1aea88b272d5d8bd673
parent86ce2be65a748ad978eb8d58bfa4a04b1aee0d6d
Revert r300385 and r300624 which was false positive
reported by cppcheck.

dup_ncp() tries to allocate a buffer of MAXNETCONFIGLINE
as tmp, which is then assigned to p->nc_netid via strcpy,
so the free(p->nc_netid) would have correctly released
the memory in case nc_lookups() fails, therefore, the
allerged leak never existed.

MFC after: 3 days
lib/libc/rpc/getnetconfig.c