rx: protect against invalid params in rx_Copy*RPCStats
[openafs.git] / src / rx / rx.c
index f4af618..4689bea 100644 (file)
@@ -8232,6 +8232,9 @@ rx_CopyProcessRPCStats(afs_uint64 op)
     if (rxInterface == -1)
         return NULL;
 
+    if (rpcop_stat == NULL)
+        return NULL;
+
     MUTEX_ENTER(&rx_rpc_stats);
     rpc_stat = rxi_FindRpcStat(&processStats, rxInterface, 0, 0,
                               0, 0, 0, 0, 0);
@@ -8262,6 +8265,9 @@ rx_CopyPeerRPCStats(afs_uint64 op, afs_uint32 peerHost, afs_uint16 peerPort)
     if (rxInterface == -1)
         return NULL;
 
+    if (rpcop_stat == NULL)
+        return NULL;
+
     peer = rxi_FindPeer(peerHost, peerPort, 0, 0);
     if (!peer)
         return NULL;