From 55f908a1cd99203d2bfa9b51b80af09e5ae67bf9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= Date: Fri, 12 May 2017 15:01:08 +0200 Subject: [PATCH] migrate: cleanup: $free is always defined --- PVE/Storage.pm | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/PVE/Storage.pm b/PVE/Storage.pm index 77fdf33..5819bde 100755 --- a/PVE/Storage.pm +++ b/PVE/Storage.pm @@ -647,10 +647,8 @@ sub storage_migrate { warn "send/receive failed, cleaning up snapshot(s)..\n" if $err; eval { volume_snapshot_delete($cfg, $volid, '__migration__', 0) }; warn "could not remove source snapshot: $@\n" if $@; - if (defined($free)) { - eval { run_command($free) }; - warn "could not remove target snapshot: $@\n" if $@; - } + eval { run_command($free) }; + warn "could not remove target snapshot: $@\n" if $@; die $err if $err; } else { die "$errstr - target type $tcfg->{type} is not valid\n";