From: Reshma Pattan Subject: [PATCH] examples/ip_pipeline: fixes uninitialized scalar variable Date: Wed, 18 Apr 2018 17:58:07 +0100 Message-ID: <1524070690-12000-1-git-send-email-reshma.pattan@intel.com> Cc: jasvinder.singh@intel.com, Reshma Pattan To: dev@dpdk.org Return-path: Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id 8781F728B for ; Wed, 18 Apr 2018 18:58:15 +0200 (CEST) List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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") CC: jasvinder.singh@intel.com Signed-off-by: Reshma Pattan --- examples/ip_pipeline/cli.c | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/ip_pipeline/cli.c b/examples/ip_pipeline/cli.c index 199a31ff8..575e176c1 100644 --- a/examples/ip_pipeline/cli.c +++ b/examples/ip_pipeline/cli.c @@ -651,6 +651,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; -- 2.14.3