diff options
author | ngie <ngie@FreeBSD.org> | 2015-11-16 01:09:25 +0000 |
---|---|---|
committer | ngie <ngie@FreeBSD.org> | 2015-11-16 01:09:25 +0000 |
commit | d1d4e816ce49797ab1f23bb48cf5ee69018df284 (patch) | |
tree | 4e5e4d6985ae985e5c979066b6ee48d7ea1f7f54 /lib/libc/rpc/rpc_soc.c | |
parent | 97443342e5a249ebb1eed68e40fe7e8864ed1781 (diff) | |
download | FreeBSD-src-d1d4e816ce49797ab1f23bb48cf5ee69018df284.zip FreeBSD-src-d1d4e816ce49797ab1f23bb48cf5ee69018df284.tar.gz |
MFC r290253:
Remove unnecessary `if (x)` tests before calling `free(x)`; free(3)
already employs this check
Sponsored by: EMC / Isilon Storage Division
Diffstat (limited to 'lib/libc/rpc/rpc_soc.c')
-rw-r--r-- | lib/libc/rpc/rpc_soc.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/libc/rpc/rpc_soc.c b/lib/libc/rpc/rpc_soc.c index d7702f5..fbcec05 100644 --- a/lib/libc/rpc/rpc_soc.c +++ b/lib/libc/rpc/rpc_soc.c @@ -472,8 +472,7 @@ clntunix_create(raddr, prog, vers, sockp, sendsz, recvsz) if ((raddr->sun_len == 0) || ((svcaddr = malloc(sizeof(struct netbuf))) == NULL ) || ((svcaddr->buf = malloc(sizeof(struct sockaddr_un))) == NULL)) { - if (svcaddr != NULL) - free(svcaddr); + free(svcaddr); rpc_createerr.cf_stat = RPC_SYSTEMERROR; rpc_createerr.cf_error.re_errno = errno; return(cl); |