mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
o check result of an allocation
This commit is contained in:
parent
277237805a
commit
f7cbb38dbb
@ -240,6 +240,11 @@ struct disk_list *read_disk(struct device *dev, struct pool *mem,
|
|||||||
struct disk_list *data = pool_alloc(mem, sizeof(*data));
|
struct disk_list *data = pool_alloc(mem, sizeof(*data));
|
||||||
const char *name = dev_name(dev);
|
const char *name = dev_name(dev);
|
||||||
|
|
||||||
|
if (!data) {
|
||||||
|
stack;
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
data->dev = dev;
|
data->dev = dev;
|
||||||
data->mem = mem;
|
data->mem = mem;
|
||||||
list_init(&data->uuids);
|
list_init(&data->uuids);
|
||||||
|
Loading…
Reference in New Issue
Block a user