mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
Add check for allocation failure
This commit is contained in:
parent
daaea2ef94
commit
3e74542b5d
@ -1,5 +1,6 @@
|
||||
Version 2.02.92 -
|
||||
====================================
|
||||
Add check for allocation failure in _build_matcher().
|
||||
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.
|
||||
|
@ -110,16 +110,17 @@ static int _build_matcher(struct rfilter *rf, const struct dm_config_value *val)
|
||||
count++;
|
||||
}
|
||||
|
||||
/*
|
||||
* allocate space for them
|
||||
*/
|
||||
if (!(regex = dm_pool_alloc(scratch, sizeof(*regex) * count)))
|
||||
goto_out;
|
||||
/* Allocate space for them */
|
||||
if (!(regex = dm_pool_alloc(scratch, sizeof(*regex) * count))) {
|
||||
log_error("Failed to allocate regex.");
|
||||
goto out;
|
||||
}
|
||||
|
||||
/*
|
||||
* create the accept/reject bitset
|
||||
*/
|
||||
rf->accept = dm_bitset_create(rf->mem, count);
|
||||
/* Create the accept/reject bitset */
|
||||
if (!(rf->accept = dm_bitset_create(rf->mem, count))) {
|
||||
log_error("Failed to create bitset.");
|
||||
goto out;
|
||||
}
|
||||
|
||||
/*
|
||||
* fill the array back to front because we
|
||||
|
Loading…
Reference in New Issue
Block a user