render / rpms / libvirt

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