1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

cov: validata top_lv

Add explicit pointer check is never NULL.
This commit is contained in:
Zdenek Kabelac 2023-04-26 13:44:52 +02:00
parent fae0ed8f10
commit 242bf56413

View File

@ -5951,6 +5951,11 @@ static void _setup_params_for_extend_metadata(struct logical_volume *lv,
static int _lv_resize_check_used(struct logical_volume *lv)
{
if (!lv) {
log_error(INTERNAL_ERROR "LV is not specified.");
return 0;
}
if (lv_is_locked(lv)) {
log_error("Can't resize locked logical volume %s.", display_lvname(lv));
return 0;