diff options
author | Renato Botelho <renato@netgate.com> | 2015-11-16 07:57:22 -0200 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2015-11-16 07:57:22 -0200 |
commit | ad0b136d63d70552782c5c4936ce97e8aa42442e (patch) | |
tree | 44825d3d4a6cdbed690f2a6d5611f043119188fd /lib/libc/rpc/getnetconfig.c | |
parent | 2e02b14e19fd0fe27055d4a6e11a65e76882bf5f (diff) | |
parent | d1d4e816ce49797ab1f23bb48cf5ee69018df284 (diff) | |
download | FreeBSD-src-ad0b136d63d70552782c5c4936ce97e8aa42442e.zip FreeBSD-src-ad0b136d63d70552782c5c4936ce97e8aa42442e.tar.gz |
Merge remote-tracking branch 'origin/stable/10' into devel
Diffstat (limited to 'lib/libc/rpc/getnetconfig.c')
-rw-r--r-- | lib/libc/rpc/getnetconfig.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/lib/libc/rpc/getnetconfig.c b/lib/libc/rpc/getnetconfig.c index 34be6e1..66b9f83 100644 --- a/lib/libc/rpc/getnetconfig.c +++ b/lib/libc/rpc/getnetconfig.c @@ -164,8 +164,7 @@ __nc_error() if ((nc_addr = (int *)thr_getspecific(nc_key)) == NULL) { nc_addr = (int *)malloc(sizeof (int)); if (thr_setspecific(nc_key, (void *) nc_addr) != 0) { - if (nc_addr) - free(nc_addr); + free(nc_addr); return (&nc_error); } *nc_addr = 0; @@ -419,7 +418,7 @@ void *handlep; while (q != NULL) { p = q->next; - if (q->ncp->nc_lookups != NULL) free(q->ncp->nc_lookups); + free(q->ncp->nc_lookups); free(q->ncp); free(q->linep); free(q); @@ -541,8 +540,7 @@ freenetconfigent(netconfigp) { if (netconfigp != NULL) { free(netconfigp->nc_netid); /* holds all netconfigp's strings */ - if (netconfigp->nc_lookups != NULL) - free(netconfigp->nc_lookups); + free(netconfigp->nc_lookups); free(netconfigp); } return; @@ -631,8 +629,7 @@ struct netconfig *ncp; /* where to put results */ } else { char *cp; /* tmp string */ - if (ncp->nc_lookups != NULL) /* from last visit */ - free(ncp->nc_lookups); + free(ncp->nc_lookups); /* from last visit */ ncp->nc_lookups = NULL; ncp->nc_nlookups = 0; while ((cp = tokenp) != NULL) { |