Make analyzer explicitelly aware we can't get NULL here.
dm_list_add(&split_images, &lvl->list);
}
+ if (!new_lv) {
+ log_error(INTERNAL_ERROR "New LV not found.");
+ return 0;
+ }
+
new_lv->name = dm_pool_strdup(lv->vg->vgmem, split_name);
if (!new_lv->name) {
log_error("Unable to rename newly split LV.");
return ECMD_PROCESSED;
}
- if (!_check_all_dm_devices(vg_name, &found)) {
+ if (!vg_name) {
+ log_error(INTERNAL_ERROR "VG name is not set.");
+ return ECMD_FAILED;
+ } else if (!_check_all_dm_devices(vg_name, &found)) {
log_warn("WARNING: Failed to check for active volumes in volume group \"%s\".", vg_name);
} else if (found) {
log_warn("WARNING: Found %u active volume(s) in volume group \"%s\".",