render / rpms / libvirt

Forked from rpms/libvirt 9 months ago
Clone
79b470
From 3b2892c175918021f78a7dfc8dac39f4c451a15f Mon Sep 17 00:00:00 2001
79b470
Message-Id: <3b2892c175918021f78a7dfc8dac39f4c451a15f@dist-git>
79b470
From: =?UTF-8?q?J=C3=A1n=20Tomko?= <jtomko@redhat.com>
79b470
Date: Sat, 12 Dec 2020 22:04:53 -0500
79b470
Subject: [PATCH] util: virNetDevTapCreate: initialize fd to -1
79b470
MIME-Version: 1.0
79b470
Content-Type: text/plain; charset=UTF-8
79b470
Content-Transfer-Encoding: 8bit
79b470
79b470
Signed-off-by: Ján Tomko <jtomko@redhat.com>
79b470
Fixes: 95089f481e003d971fe0a082018216c58c1b80e5
79b470
(cherry picked from commit 2b6cd855042984b87beb7e3c30b67b0f586d89bb)
79b470
79b470
https://bugzilla.redhat.com/1874304
79b470
Signed-off-by: Laine Stump <laine@redhat.com>
79b470
Message-Id: <20201213030453.48851-4-laine@redhat.com>
79b470
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
79b470
---
79b470
 src/util/virnetdevtap.c | 2 +-
79b470
 1 file changed, 1 insertion(+), 1 deletion(-)
79b470
79b470
diff --git a/src/util/virnetdevtap.c b/src/util/virnetdevtap.c
79b470
index fd4b70df30..d333163ff9 100644
79b470
--- a/src/util/virnetdevtap.c
79b470
+++ b/src/util/virnetdevtap.c
79b470
@@ -318,7 +318,7 @@ int virNetDevTapCreate(char **ifname,
79b470
     size_t i = 0;
79b470
     struct ifreq ifr;
79b470
     int ret = -1;
79b470
-    int fd = 0;
79b470
+    int fd = -1;
79b470
 
79b470
     virMutexLock(&virNetDevTapCreateMutex);
79b470
 
79b470
-- 
79b470
2.29.2
79b470