summaryrefslogtreecommitdiffstats
path: root/rpc
diff options
context:
space:
mode:
Diffstat (limited to 'rpc')
-rw-r--r--rpc/rpc-lib/src/rpcsvc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/rpc/rpc-lib/src/rpcsvc.c b/rpc/rpc-lib/src/rpcsvc.c
index b3916eb54c2..cd5ca65cec3 100644
--- a/rpc/rpc-lib/src/rpcsvc.c
+++ b/rpc/rpc-lib/src/rpcsvc.c
@@ -2873,6 +2873,10 @@ rpcsvc_transport_peer_check_search(dict_t *options, char *pattern, char *ip,
}
dup_addrstr = gf_strdup(addrstr);
+ if (dup_addrstr == NULL) {
+ ret = -1;
+ goto err;
+ }
addrtok = strtok_r(dup_addrstr, ",", &svptr);
while (addrtok) {
/* CASEFOLD not present on Solaris */