The initial logic do not give a value to the out parameter in the abnormal logic, which cause an local variable uninitialized problem.
Fixes: 3d6811281392 ("net/nfp: add infrastructure for conntrack flow merge") Cc: chaoyong...@corigine.com Signed-off-by: Chaoyong He <chaoyong...@corigine.com> --- drivers/net/nfp/flower/nfp_conntrack.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/nfp/flower/nfp_conntrack.c b/drivers/net/nfp/flower/nfp_conntrack.c index aacd4d7dd3..7b84b12546 100644 --- a/drivers/net/nfp/flower/nfp_conntrack.c +++ b/drivers/net/nfp/flower/nfp_conntrack.c @@ -332,6 +332,7 @@ nfp_flow_item_conf_size_get(enum rte_flow_item_type type, break; default: PMD_DRV_LOG(ERR, "Unsupported item type: %d", type); + *size = 0; return false; } @@ -1265,9 +1266,9 @@ nfp_ct_merge_item_real(const struct rte_flow_item *item_src, struct rte_flow_item *item_dst) { uint32_t i; - size_t size; char *key_dst; char *mask_dst; + size_t size = 0; const char *key_src; const char *mask_src; -- 2.39.1