From 80fa3511be331fc49ff06eaa6364651da1a4f55d Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Mon, 27 May 2024 17:01:25 +0200 Subject: [PATCH] lvremove: check for handle Get lvremove_params from non NULL handle. Introduced in commit 47f8bda05. TODO: any more thing needed ? --- tools/toollib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/toollib.c b/tools/toollib.c index 6e9113b0d..16ac0426b 100644 --- a/tools/toollib.c +++ b/tools/toollib.c @@ -4807,7 +4807,7 @@ static void _lvremove_save_uuid(struct cmd_context *cmd, struct logical_volume * int lvremove_single(struct cmd_context *cmd, struct logical_volume *lv, struct processing_handle *handle) { - struct lvremove_params *lp = (struct lvremove_params *) handle->custom_handle; + struct lvremove_params *lp = (handle) ? (struct lvremove_params *) handle->custom_handle : NULL; /* * Single force is equivalent to single --yes