summaryrefslogtreecommitdiff
path: root/examples/ip_pipeline/cli.c
diff options
context:
space:
mode:
authorReshma Pattan <reshma.pattan@intel.com>2018-04-18 17:58:07 +0100
committerCristian Dumitrescu <cristian.dumitrescu@intel.com>2018-05-08 13:14:05 +0200
commit1d27b0f2c2346f9d8065706736848f16bb9f2c49 (patch)
tree91cee0cfa80dcd12ec73c8b96482eefc928da472 /examples/ip_pipeline/cli.c
parent84a27d8913ce1d8a36fc1168fc3cbf36526e7dee (diff)
downloaddpdk-1d27b0f2c2346f9d8065706736848f16bb9f2c49.zip
dpdk-1d27b0f2c2346f9d8065706736848f16bb9f2c49.tar.gz
dpdk-1d27b0f2c2346f9d8065706736848f16bb9f2c49.tar.xz
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 <reshma.pattan@intel.com> Reviewed-by: Jasvinder Singh <jasvinder.singh@intel.com>
Diffstat (limited to 'examples/ip_pipeline/cli.c')
-rw-r--r--examples/ip_pipeline/cli.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/examples/ip_pipeline/cli.c b/examples/ip_pipeline/cli.c
index 6aebae4..2f30a6d 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;