mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
Add check for rimage name allocation failure
This commit is contained in:
parent
bed744c15d
commit
cbe6bcd593
@ -1,5 +1,6 @@
|
||||
Version 2.02.92 -
|
||||
====================================
|
||||
Add check for rimage name allocation failure in _raid_add_images().
|
||||
Add check for mda_copy failure in _text_pv_setup().
|
||||
Add check for _mirrored_init_target failure.
|
||||
Add free_orphan_vg.
|
||||
|
@ -655,7 +655,10 @@ static int _raid_add_images(struct logical_volume *lv,
|
||||
if (l == dm_list_last(&data_lvs)) {
|
||||
lvl = dm_list_item(l, struct lv_list);
|
||||
len = strlen(lv->name) + strlen("_rimage_XXX");
|
||||
name = dm_pool_alloc(lv->vg->vgmem, len);
|
||||
if (!(name = dm_pool_alloc(lv->vg->vgmem, len))) {
|
||||
log_error("Failed to allocate rimage name.");
|
||||
return 0;
|
||||
}
|
||||
sprintf(name, "%s_rimage_%u", lv->name, count);
|
||||
lvl->lv->name = name;
|
||||
continue;
|
||||
|
Loading…
Reference in New Issue
Block a user