Coverity fixes, VPP-486
Change-Id: I8906bb983128e8f6e2664e367d2015325c1125fb
Signed-off-by: Dave Barach <dave@barachs.net>
diff --git a/vnet/vnet/sr/sr_replicate.c b/vnet/vnet/sr/sr_replicate.c
index 34cde3d..5f9de50 100644
--- a/vnet/vnet/sr/sr_replicate.c
+++ b/vnet/vnet/sr/sr_replicate.c
@@ -253,6 +253,8 @@
/* Not the last tunnel to process */
clone0 = rte_pktmbuf_clone
(orig_mb0, bm->pktmbuf_pools[socket_id]);
+ if (clone0 == 0)
+ goto clone_fail;
nb_seg = 0;
clone0i = clone0;
clone0_c = NULL;
@@ -289,6 +291,7 @@
if (PREDICT_FALSE (!clone0 || !hdr_mb0))
{
+ clone_fail:
b0->error = node->errors[SR_REPLICATE_ERROR_NO_BUFFERS];
vec_foreach_index (i, rte_mbuf_vec)