From mboxrd@z Thu Jan 1 00:00:00 1970 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) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Apr 2018 09:58:14 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,466,1517904000"; d="scan'208";a="34637326" Received: from sivswdev02.ir.intel.com (HELO localhost.localdomain) ([10.237.217.46]) by orsmga008.jf.intel.com with ESMTP; 18 Apr 2018 09:58:12 -0700 From: Reshma Pattan To: dev@dpdk.org Cc: jasvinder.singh@intel.com, Reshma Pattan Date: Wed, 18 Apr 2018 17:58:07 +0100 Message-Id: <1524070690-12000-1-git-send-email-reshma.pattan@intel.com> X-Mailer: git-send-email 1.7.0.7 Subject: [dpdk-dev] [PATCH] examples/ip_pipeline: fixes uninitialized scalar variable X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Apr 2018 16:58:16 -0000 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