render / rpms / libvirt

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