DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH v1] net/virtio-user: fix uninitialized variable
@ 2020-07-14 11:03 Chenbo Xia
  2020-07-15  6:32 ` Adrian Moreno
  0 siblings, 1 reply; 3+ messages in thread
From: Chenbo Xia @ 2020-07-14 11:03 UTC (permalink / raw)
  To: dev; +Cc: maxime.coquelin, zhihong.wang, amorenoz

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 <chenbo.xia@intel.com>
---
 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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-07-16 16:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-14 11:03 [dpdk-dev] [PATCH v1] net/virtio-user: fix uninitialized variable Chenbo Xia
2020-07-15  6:32 ` Adrian Moreno
2020-07-16 16:14   ` Ferruh Yigit

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).