1
0
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:
Joe Thornber 2001-11-12 16:00:52 +00:00
parent 277237805a
commit f7cbb38dbb

View File

@ -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);