mirror of
https://git.rtems.org/rtems-libbsd/
synced 2025-10-15 16:25:00 +08:00
Update to FreeBSD head 2017-04-04
Git mirror commit 642b174daddbd0efd9bb5f242c43f4ab4db6869f.
This commit is contained in:
@@ -632,8 +632,8 @@ parse_ncp(char *stringp, struct netconfig *ncp)
|
||||
ncp->nc_lookups = NULL;
|
||||
ncp->nc_nlookups = 0;
|
||||
while ((cp = tokenp) != NULL) {
|
||||
if ((nc_lookups = realloc(ncp->nc_lookups,
|
||||
(ncp->nc_nlookups + 1) * sizeof *ncp->nc_lookups)) == NULL) {
|
||||
if ((nc_lookups = reallocarray(ncp->nc_lookups,
|
||||
ncp->nc_nlookups + 1, sizeof(*ncp->nc_lookups))) == NULL) {
|
||||
free(ncp->nc_lookups);
|
||||
ncp->nc_lookups = NULL;
|
||||
return (-1);
|
||||
|
Reference in New Issue
Block a user