From 053d2cc39dbc05ebb07632d610e5c5c8b793c3895bde16cc83ad5be98e6bb514 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Sun, 25 Apr 2021 09:46:20 +0000 Subject: [PATCH] Accepting request 888065 from home:vulyanov:branches:Virtualization - Fix virt-launcher crash fix-double-free-of-VirDomain.patch OBS-URL: https://build.opensuse.org/request/show/888065 OBS-URL: https://build.opensuse.org/package/show/Virtualization/kubevirt?expand=0&rev=43 --- fix-double-free-of-VirDomain.patch | 14 ++++++++++++++ kubevirt.changes | 6 ++++++ kubevirt.spec | 1 + 3 files changed, 21 insertions(+) create mode 100644 fix-double-free-of-VirDomain.patch diff --git a/fix-double-free-of-VirDomain.patch b/fix-double-free-of-VirDomain.patch new file mode 100644 index 0000000..1a1a289 --- /dev/null +++ b/fix-double-free-of-VirDomain.patch @@ -0,0 +1,14 @@ +Fix double free of VirDomain + +diff --git a/pkg/virt-launcher/virtwrap/manager.go b/pkg/virt-launcher/virtwrap/manager.go +index a3fe15e39..660423269 100644 +--- a/pkg/virt-launcher/virtwrap/manager.go ++++ b/pkg/virt-launcher/virtwrap/manager.go +@@ -1494,7 +1494,6 @@ func (l *LibvirtDomainManager) SyncVMI(vmi *v1.VirtualMachineInstance, useEmulat + if err != nil { + return nil, err + } +- defer dom.Free() + logger.Info("Domain defined.") + } else { + logger.Reason(err).Error("Getting the domain failed.") diff --git a/kubevirt.changes b/kubevirt.changes index a960f71..682f652 100644 --- a/kubevirt.changes +++ b/kubevirt.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Apr 23 09:50:20 UTC 2021 - Vasily Ulyanov + +- Fix virt-launcher crash + fix-double-free-of-VirDomain.patch + ------------------------------------------------------------------- Tue Apr 20 13:12:00 UTC 2021 - Vasily Ulyanov diff --git a/kubevirt.spec b/kubevirt.spec index 4cdd5b2..ec0e9c4 100644 --- a/kubevirt.spec +++ b/kubevirt.spec @@ -29,6 +29,7 @@ Source100: %{name}-rpmlintrc Patch0: dont-build-virtctl-darwin.patch Patch1: dont-use-bazel-in-build-manifests.patch Patch2: fix-virsh-domcapabilities-error.patch +Patch3: fix-double-free-of-VirDomain.patch BuildRequires: glibc-devel-static BuildRequires: golang-packaging BuildRequires: pkgconfig