From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 87631A0540; Tue, 14 Jul 2020 04:14:50 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 877FF1D581; Tue, 14 Jul 2020 04:14:49 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 3F3AC1D542 for ; Tue, 14 Jul 2020 04:14:48 +0200 (CEST) IronPort-SDR: KOzjtZ6qILpBg6vln+Kx6t1Vgg2NrKlvZhIJ3s5O23YatXH5ugplzppM9KB4aEx0Iapl/aBnq/ lT3/zPQ9pM/Q== X-IronPort-AV: E=McAfee;i="6000,8403,9681"; a="213591127" X-IronPort-AV: E=Sophos;i="5.75,349,1589266800"; d="scan'208";a="213591127" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Jul 2020 19:14:47 -0700 IronPort-SDR: M7Gj0bXFK6ylXLsq9g1xiqRX2vaJXaL/dGcNvvCXrmQ8AAzkJzvBBOo+qD4bZuFsFZ3BFy958o Wdvc0rL7Bi/Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,349,1589266800"; d="scan'208";a="299389035" Received: from npg-dpdk-virtio-xiachenbo-nw.sh.intel.com ([10.67.119.123]) by orsmga002.jf.intel.com with ESMTP; 13 Jul 2020 19:14:45 -0700 From: Chenbo Xia To: dev@dpdk.org Cc: maxime.coquelin@redhat.com, zhihong.wang@intel.com, amorenoz@redhat.com Date: Tue, 14 Jul 2020 11:03:05 +0000 Message-Id: <20200714110305.73911-1-chenbo.xia@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [dpdk-dev] [PATCH v1] net/virtio-user: fix uninitialized 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" This patch fixes an issue that uninitialized has_reply_ack is used for setting message flags. Coverity issue: 360834 Fixes: c60208dd6384 ("net/virtio-user: support reply-ack") Signed-off-by: Chenbo Xia --- drivers/net/virtio/virtio_user/vhost_user.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/virtio/virtio_user/vhost_user.c b/drivers/net/virtio/virtio_user/vhost_user.c index 631d0e353..ad48bafd4 100644 --- a/drivers/net/virtio/virtio_user/vhost_user.c +++ b/drivers/net/virtio/virtio_user/vhost_user.c @@ -254,7 +254,7 @@ vhost_user_sock(struct virtio_user_dev *dev, struct vhost_user_msg msg; struct vhost_vring_file *file = 0; int need_reply = 0; - int has_reply_ack; + int has_reply_ack = 0; int fds[VHOST_MEMORY_MAX_NREGIONS]; int fd_num = 0; int len; -- 2.17.1