[dpdk-stable] [PATCH] app/testpmd: do not use a possibly NULL Pointer
Thierry Herbelot
thierry.herbelot at 6wind.com
Mon May 24 11:01:44 CEST 2021
Use out only after it was checked not to be NULL.
Fixes: 4d07cbefe3ba0 ("app/testpmd: add commands for conntrack")
Cc: stable at dpdk.org
Cc: Ori Kam <orika at nvidia.com>
Signed-off-by: Thierry Herbelot <thierry.herbelot at 6wind.com>
---
app/test-pmd/cmdline_flow.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
index 1c587bb7b803..7645b3cc90a1 100644
--- a/app/test-pmd/cmdline_flow.c
+++ b/app/test-pmd/cmdline_flow.c
@@ -6631,10 +6631,10 @@ parse_vc_action_conntrack_update(struct context *ctx, const struct token *token,
/* Token name must match. */
if (parse_default(ctx, token, str, len, NULL, 0) < 0)
return -1;
- ct_modify = (struct rte_flow_modify_conntrack *)out->args.vc.data;
/* Nothing else to do if there is no buffer. */
if (!out)
return len;
+ ct_modify = (struct rte_flow_modify_conntrack *)out->args.vc.data;
if (ctx->curr == ACTION_CONNTRACK_UPDATE_DIR) {
ct_modify->new_ct.is_original_dir =
conntrack_context.is_original_dir;
--
2.29.2
More information about the stable
mailing list