diff options
author | Zdenek Kabelac <zkabelac@redhat.com> | 2023-04-26 13:37:41 +0200 |
---|---|---|
committer | Zdenek Kabelac <zkabelac@redhat.com> | 2023-05-06 19:22:05 +0200 |
commit | 871d9f379f79f1969d71b660164efe18515826c2 (patch) | |
tree | 344744db23adbf7d7a1565b82c5ee75d0311e3c6 | |
parent | 662020c221fdb3e23c66947f6c81f99a0950744a (diff) | |
download | lvm2-871d9f379f79f1969d71b660164efe18515826c2.tar.gz |
cov: ensure NULL baton is not dereferenced
-rw-r--r-- | tools/pvmove_poll.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/pvmove_poll.c b/tools/pvmove_poll.c index 751313cd7..6b3ab4550 100644 --- a/tools/pvmove_poll.c +++ b/tools/pvmove_poll.c @@ -20,7 +20,7 @@ static int _is_pvmove_image_removable(struct logical_volume *mimage_lv, void *baton) { - uint32_t mimage_to_remove = *((uint32_t *)baton); + uint32_t mimage_to_remove = baton ? *((uint32_t *)baton) : UINT32_MAX; struct lv_segment *mirror_seg; if (!(mirror_seg = get_only_segment_using_this_lv(mimage_lv))) { |