[pve-devel] [PATCH storage 1/2] pbs: free image: explicitly return undef

Fabian Ebner f.ebner at proxmox.com
Tue May 4 11:52:53 CEST 2021


Storage.pm's vdisk_free interprets truthy return values as worker subs, so be
explicit about returning undef here. Not an issue at the moment, because
run_client_command already returns undef, but better be safe than sorry.

Signed-off-by: Fabian Ebner <f.ebner at proxmox.com>
---
 PVE/Storage/PBSPlugin.pm | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/PVE/Storage/PBSPlugin.pm b/PVE/Storage/PBSPlugin.pm
index ae45a1a..68c702a 100644
--- a/PVE/Storage/PBSPlugin.pm
+++ b/PVE/Storage/PBSPlugin.pm
@@ -595,6 +595,8 @@ sub free_image {
     my ($vtype, $name, $vmid) = $class->parse_volname($volname);
 
     run_client_cmd($scfg, $storeid, "forget", [ $name ], 1);
+
+    return;
 }
 
 
-- 
2.20.1






More information about the pve-devel mailing list