From: Reshma Pattan Date: Wed, 18 Apr 2018 16:58:07 +0000 (+0100) Subject: examples/ip_pipeline: fix uninitialized KNI parameter X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=1d27b0f2c2346f9d8065706736848f16bb9f2c49;p=dpdk.git examples/ip_pipeline: fix uninitialized KNI parameter Using uninitialized value p.thread_id when calling kni_create. Initialize the kni_params object to 0. Coverity issue: 272569 Fixes: 9a408cc8ac ("examples/ip_pipeline: add KNI object") Signed-off-by: Reshma Pattan Reviewed-by: Jasvinder Singh --- diff --git a/examples/ip_pipeline/cli.c b/examples/ip_pipeline/cli.c index 6aebae4207..2f30a6d01d 100644 --- a/examples/ip_pipeline/cli.c +++ b/examples/ip_pipeline/cli.c @@ -653,6 +653,7 @@ cmd_kni(char **tokens, char *name; struct kni *kni; + memset(&p, 0, sizeof(p)); if ((n_tokens != 6) && (n_tokens != 8)) { snprintf(out, out_size, MSG_ARG_MISMATCH, tokens[0]); return;