diff options
author | Joe Thornber <joe@fib011235813.fsnet.co.uk> | 2001-11-12 16:00:52 +0000 |
---|---|---|
committer | Joe Thornber <joe@fib011235813.fsnet.co.uk> | 2001-11-12 16:00:52 +0000 |
commit | f08f70276ceae1510e5616d7b3a9de8b712bf2a6 (patch) | |
tree | 32356474b679a2e1e6bc9a772773f083628ab602 | |
parent | 1ae50fd95b78f3e0dc002e9350267be82ed9aded (diff) | |
download | lvm2-f08f70276ceae1510e5616d7b3a9de8b712bf2a6.tar.gz |
o check result of an allocation
-rw-r--r-- | lib/format1/disk-rep.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/format1/disk-rep.c b/lib/format1/disk-rep.c index af9ead967..7a590af80 100644 --- a/lib/format1/disk-rep.c +++ b/lib/format1/disk-rep.c @@ -240,6 +240,11 @@ struct disk_list *read_disk(struct device *dev, struct pool *mem, struct disk_list *data = pool_alloc(mem, sizeof(*data)); const char *name = dev_name(dev); + if (!data) { + stack; + return NULL; + } + data->dev = dev; data->mem = mem; list_init(&data->uuids); |