From: Pavan Nikhilesh <pbhagavat...@marvell.com> Free memory allocated for the node when xstats memory allocation fails.
Coverity issue: 445529 Fixes: 070db97e017b ("graph: support node xstats") Signed-off-by: Pavan Nikhilesh <pbhagavat...@marvell.com> --- lib/graph/node.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/graph/node.c b/lib/graph/node.c index f15922892e..eb685b409f 100644 --- a/lib/graph/node.c +++ b/lib/graph/node.c @@ -156,7 +156,7 @@ node_clone(struct node *node, const char *name) (node->xstats->nb_xstats * RTE_NODE_XSTAT_DESC_SIZE)); if (reg->xstats == NULL) { rte_errno = ENOMEM; - goto fail; + goto free; } for (i = 0; i < node->xstats->nb_xstats; i++) -- 2.25.1