From: Thomas Lamprecht Date: Wed, 15 Jan 2020 07:06:14 +0000 (+0100) Subject: api: vm clone: remove cloned FW conf in error cleanup path X-Git-Url: https://git.proxmox.com/?p=qemu-server.git;a=commitdiff_plain;h=c05c90a10df19f4abee61f8031fbe5b1cf618066 api: vm clone: remove cloned FW conf in error cleanup path We clone the source VM firewall config before forking the "realcmd" worker, but did not mind cleaning it up again if the clone failed somewhere in the worker. Signed-off-by: Thomas Lamprecht --- diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm index 454cd4a..f5e757a 100644 --- a/PVE/API2/Qemu.pm +++ b/PVE/API2/Qemu.pm @@ -2940,6 +2940,9 @@ __PACKAGE__->register_method({ eval { PVE::Storage::vdisk_free($storecfg, $volid); }; warn $@ if $@; } + + PVE::Firewall::remove_vmfw_conf($newid); + die "clone failed: $err"; }