summaryrefslogtreecommitdiffstats
path: root/lib/libc/rpc/rpc_soc.c
diff options
context:
space:
mode:
authorngie <ngie@FreeBSD.org>2015-11-02 01:22:06 +0000
committerngie <ngie@FreeBSD.org>2015-11-02 01:22:06 +0000
commitf0f16665a936e73ce7bfb8e2e28d6f5a2db43d65 (patch)
tree3b8c47ba08dbe9b0d9dd76e5082e7d8ee55777bd /lib/libc/rpc/rpc_soc.c
parent329f3219e7277d9bba3117c406e66826c63e29fa (diff)
downloadFreeBSD-src-f0f16665a936e73ce7bfb8e2e28d6f5a2db43d65.zip
FreeBSD-src-f0f16665a936e73ce7bfb8e2e28d6f5a2db43d65.tar.gz
Remove unnecessary `if (x)` tests before calling `free(x)`; free(3)
already employs this check MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division
Diffstat (limited to 'lib/libc/rpc/rpc_soc.c')
-rw-r--r--lib/libc/rpc/rpc_soc.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/libc/rpc/rpc_soc.c b/lib/libc/rpc/rpc_soc.c
index 8fc91ff..11fc803 100644
--- a/lib/libc/rpc/rpc_soc.c
+++ b/lib/libc/rpc/rpc_soc.c
@@ -432,8 +432,7 @@ clntunix_create(struct sockaddr_un *raddr, u_long prog, u_long vers, int *sockp,
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);
OpenPOWER on IntegriCloud