]> sourceware.org Git - lvm2.git/commitdiff
lvremove: check for handle 1307327464
authorZdenek Kabelac <zkabelac@redhat.com>
Mon, 27 May 2024 15:01:25 +0000 (17:01 +0200)
committerZdenek Kabelac <zkabelac@redhat.com>
Mon, 27 May 2024 15:03:37 +0000 (17:03 +0200)
Get lvremove_params from non NULL handle.
Introduced in commit 47f8bda05.
TODO: any more thing needed ?

tools/toollib.c

index 6e9113b0d9e0dd6dc376938eaf36021afba7d89f..16ac0426b4c6fad172cb11e0a7b3f5f3766a6401 100644 (file)
@@ -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
This page took 0.068806 seconds and 5 git commands to generate.