diff options
author | Mike Frysinger | 2005-06-11 22:37:25 +0000 |
---|---|---|
committer | Mike Frysinger | 2005-06-11 22:37:25 +0000 |
commit | 7fde8debc450c19927b82e3434fc5d6a6dd4d35d (patch) | |
tree | ec0c844948d2fd786039f5ba39427a82e004506d /e2fsprogs/blkid/devname.c | |
parent | d1a9d57bd6d9e40fb25564f10b0bd85f0a2c1e3a (diff) | |
download | busybox-7fde8debc450c19927b82e3434fc5d6a6dd4d35d.zip busybox-7fde8debc450c19927b82e3434fc5d6a6dd4d35d.tar.gz |
use malloc instead of xmalloc
Diffstat (limited to 'e2fsprogs/blkid/devname.c')
-rw-r--r-- | e2fsprogs/blkid/devname.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/e2fsprogs/blkid/devname.c b/e2fsprogs/blkid/devname.c index 87d5cbe..b323021 100644 --- a/e2fsprogs/blkid/devname.c +++ b/e2fsprogs/blkid/devname.c @@ -192,9 +192,7 @@ static void lvm_probe_all(blkid_cache cache) vg_name = vg_iter->d_name; if (!strcmp(vg_name, ".") || !strcmp(vg_name, "..")) continue; - vdirname = malloc(vg_len + strlen(vg_name) + 8); - if (!vdirname) - goto exit; + vdirname = xmalloc(vg_len + strlen(vg_name) + 8); sprintf(vdirname, "%s/%s/LVs", VG_DIR, vg_name); lv_list = opendir(vdirname); @@ -209,12 +207,8 @@ static void lvm_probe_all(blkid_cache cache) if (!strcmp(lv_name, ".") || !strcmp(lv_name, "..")) continue; - lvm_device = malloc(vg_len + strlen(vg_name) + + lvm_device = xmalloc(vg_len + strlen(vg_name) + strlen(lv_name) + 8); - if (!lvm_device) { - closedir(lv_list); - goto exit; - } sprintf(lvm_device, "%s/%s/LVs/%s", VG_DIR, vg_name, lv_name); dev = lvm_get_devno(lvm_device); @@ -227,7 +221,6 @@ static void lvm_probe_all(blkid_cache cache) } closedir(lv_list); } -exit: closedir(vg_list); } #endif |