1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-21 14:50:08 +03:00

B #5796: Fix VNC PORT clean up (#1905)

(cherry picked from commit 299ac74f77e8780e22417ca3f83619a31280fcd4)
This commit is contained in:
Pavel Czerný 2022-04-06 17:57:55 +02:00 committed by Ruben S. Montero
parent 94e00aaed4
commit 3a97b0ed65
No known key found for this signature in database
GPG Key ID: A0CEA6FA880A1D87

View File

@ -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);
}