summaryrefslogtreecommitdiffstats
path: root/rpc
diff options
context:
space:
mode:
authorXavi Hernandez <xhernandez@redhat.com>2019-05-22 17:46:19 +0200
committerAmar Tumballi <amarts@redhat.com>2019-05-26 13:59:13 +0000
commit5d88111a142b3c37e92bdd36699a04fd054d27f4 (patch)
tree781cf006eb4a720dfaf3455b8f6b959b56901dc9 /rpc
parent4c85456e38b9cc2d9698decca15a21e0cb7961a9 (diff)
Fix some "Null pointer dereference" coverity issues
This patch fixes the following CID's: * 1124829 * 1274075 * 1274083 * 1274128 * 1274135 * 1274141 * 1274143 * 1274197 * 1274205 * 1274210 * 1274211 * 1288801 * 1398629 Change-Id: Ia7c86cfab3245b20777ffa296e1a59748040f558 Updates: bz#789278 Signed-off-by: Xavi Hernandez <xhernandez@redhat.com>
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 */