summaryrefslogtreecommitdiffstats
path: root/sys/rpc
diff options
context:
space:
mode:
authortrasz <trasz@FreeBSD.org>2016-03-29 13:56:59 +0000
committertrasz <trasz@FreeBSD.org>2016-03-29 13:56:59 +0000
commitca92bb3067ab9958b69fda6b1f710ff0db5fea96 (patch)
treee39a5d4590b1ea3e68ff1a7bfa905eb2d62f10bf /sys/rpc
parent68e9a48abbf297dc6891e141adfa1e5ba920d0a8 (diff)
downloadFreeBSD-src-ca92bb3067ab9958b69fda6b1f710ff0db5fea96.zip
FreeBSD-src-ca92bb3067ab9958b69fda6b1f710ff0db5fea96.tar.gz
Remove some NULL checks for M_WAITOK allocations.
MFC after: 1 month Sponsored by: The FreeBSD Foundation
Diffstat (limited to 'sys/rpc')
-rw-r--r--sys/rpc/rpc_generic.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/sys/rpc/rpc_generic.c b/sys/rpc/rpc_generic.c
index 28aa849..80d658d 100644
--- a/sys/rpc/rpc_generic.c
+++ b/sys/rpc/rpc_generic.c
@@ -390,15 +390,11 @@ __rpc_uaddr2taddr_af(int af, const char *uaddr)
}
ret = (struct netbuf *)malloc(sizeof *ret, M_RPC, M_WAITOK);
- if (ret == NULL)
- goto out;
switch (af) {
case AF_INET:
sin = (struct sockaddr_in *)malloc(sizeof *sin, M_RPC,
M_WAITOK);
- if (sin == NULL)
- goto out;
memset(sin, 0, sizeof *sin);
sin->sin_family = AF_INET;
sin->sin_port = htons(port);
@@ -415,8 +411,6 @@ __rpc_uaddr2taddr_af(int af, const char *uaddr)
case AF_INET6:
sin6 = (struct sockaddr_in6 *)malloc(sizeof *sin6, M_RPC,
M_WAITOK);
- if (sin6 == NULL)
- goto out;
memset(sin6, 0, sizeof *sin6);
sin6->sin6_family = AF_INET6;
sin6->sin6_port = htons(port);
@@ -433,8 +427,6 @@ __rpc_uaddr2taddr_af(int af, const char *uaddr)
case AF_LOCAL:
sun = (struct sockaddr_un *)malloc(sizeof *sun, M_RPC,
M_WAITOK);
- if (sun == NULL)
- goto out;
memset(sun, 0, sizeof *sun);
sun->sun_family = AF_LOCAL;
strncpy(sun->sun_path, addrstr, sizeof(sun->sun_path) - 1);
OpenPOWER on IntegriCloud