summaryrefslogtreecommitdiff
path: root/e2fsprogs/blkid/dev.c
diff options
context:
space:
mode:
Diffstat (limited to 'e2fsprogs/blkid/dev.c')
-rw-r--r--e2fsprogs/blkid/dev.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/e2fsprogs/blkid/dev.c b/e2fsprogs/blkid/dev.c
index 23af887..0e2b4e1 100644
--- a/e2fsprogs/blkid/dev.c
+++ b/e2fsprogs/blkid/dev.c
@@ -84,12 +84,10 @@ extern blkid_dev_iterate blkid_dev_iterate_begin(blkid_cache cache)
{
blkid_dev_iterate iter;
- iter = malloc(sizeof(struct blkid_struct_dev_iterate));
- if (iter) {
- iter->magic = DEV_ITERATE_MAGIC;
- iter->cache = cache;
- iter->p = cache->bic_devs.next;
- }
+ iter = xmalloc(sizeof(struct blkid_struct_dev_iterate));
+ iter->magic = DEV_ITERATE_MAGIC;
+ iter->cache = cache;
+ iter->p = cache->bic_devs.next;
return (iter);
}