From 3a97b0ed65e707b2a331988742737004c6289988 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pavel=20Czern=C3=BD?= Date: Wed, 6 Apr 2022 17:57:55 +0200 Subject: [PATCH] B #5796: Fix VNC PORT clean up (#1905) (cherry picked from commit 299ac74f77e8780e22417ca3f83619a31280fcd4) --- src/lcm/LifeCycleActions.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lcm/LifeCycleActions.cc b/src/lcm/LifeCycleActions.cc index b87b9a7748..d5b78fa66a 100644 --- a/src/lcm/LifeCycleActions.cc +++ b/src/lcm/LifeCycleActions.cc @@ -998,10 +998,11 @@ void LifeCycleManager::clean_up_vm(VirtualMachine * vm, bool dispose, hpool->del_capacity(vm->get_hid(), sr); - const VectorAttribute * graphics = vm->get_template_attribute("GRAPHICS"); + VectorAttribute * graphics = vm->get_template_attribute("GRAPHICS"); if ( graphics != 0 && (graphics->vector_value("PORT", port) == 0)) { + graphics->remove("PORT"); clpool->release_vnc_port(vm->get_cid(), port); }