mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
libdm: check for mem when _canonicalize_field_ids
Add missing check for dm_pool_strdup() call (Coverity).
This commit is contained in:
parent
ee04f1fcfd
commit
d70f112762
@ -1,5 +1,6 @@
|
|||||||
Version 1.02.136 -
|
Version 1.02.136 -
|
||||||
======================================
|
======================================
|
||||||
|
Check mem alloc fail in _canonicalize_field_ids().
|
||||||
Use unsigned math when checking more then 31 legs of raid.
|
Use unsigned math when checking more then 31 legs of raid.
|
||||||
Fix 'dmstats delete' with dmsetup older than v1.02.129
|
Fix 'dmstats delete' with dmsetup older than v1.02.129
|
||||||
Fix stats walk segfault with dmsetup older than v1.02.129
|
Fix stats walk segfault with dmsetup older than v1.02.129
|
||||||
|
@ -1228,7 +1228,10 @@ static int _canonicalize_field_ids(struct dm_report *rh)
|
|||||||
return_0;
|
return_0;
|
||||||
|
|
||||||
if (differs) {
|
if (differs) {
|
||||||
canonical_field_dup = dm_pool_strdup(rh->mem, canonical_field);
|
if (!(canonical_field_dup = dm_pool_strdup(rh->mem, canonical_field))) {
|
||||||
|
log_error("_canonicalize_field_dup: dm_pool_alloc failed.");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
rh->canonical_field_ids[i] = canonical_field_dup;
|
rh->canonical_field_ids[i] = canonical_field_dup;
|
||||||
} else
|
} else
|
||||||
rh->canonical_field_ids[i] = rh->fields[i].id;
|
rh->canonical_field_ids[i] = rh->fields[i].id;
|
||||||
|
Loading…
Reference in New Issue
Block a user