diff options
author | kraai <kraai@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2000-09-13 02:46:14 +0000 |
---|---|---|
committer | kraai <kraai@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2000-09-13 02:46:14 +0000 |
commit | 9f559aa7068b38ba510640873a58953e94139248 (patch) | |
tree | 5b967e1d873ff6eff8296bf9fda73825f0c55884 /util-linux | |
parent | 033cbe20a6a0389007a333a4fdf1dc87d8eb368e (diff) | |
download | busybox-w32-9f559aa7068b38ba510640873a58953e94139248.tar.gz busybox-w32-9f559aa7068b38ba510640873a58953e94139248.tar.bz2 busybox-w32-9f559aa7068b38ba510640873a58953e94139248.zip |
Fix calls to {m,c,re}alloc so that they use x{m,c,re}alloc instead of
segfaulting or handling errors the same way themselves.
git-svn-id: svn://busybox.net/trunk/busybox@1039 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'util-linux')
-rw-r--r-- | util-linux/mount.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/util-linux/mount.c b/util-linux/mount.c index b4f5746bc..15ab5c997 100644 --- a/util-linux/mount.c +++ b/util-linux/mount.c | |||
@@ -273,7 +273,7 @@ mount_one(char *blockDevice, char *directory, char *filesystemType, | |||
273 | numfilesystems = ioctl (fd, DEVMTAB_COUNT_FILESYSTEMS); | 273 | numfilesystems = ioctl (fd, DEVMTAB_COUNT_FILESYSTEMS); |
274 | if (numfilesystems<0) | 274 | if (numfilesystems<0) |
275 | fatalError("\nDEVMTAB_COUNT_FILESYSTEMS: %s\n", strerror (errno)); | 275 | fatalError("\nDEVMTAB_COUNT_FILESYSTEMS: %s\n", strerror (errno)); |
276 | fslist = (struct k_fstype *) calloc ( numfilesystems, sizeof(struct k_fstype)); | 276 | fslist = (struct k_fstype *) xcalloc ( numfilesystems, sizeof(struct k_fstype)); |
277 | 277 | ||
278 | /* Grab the list of available filesystems */ | 278 | /* Grab the list of available filesystems */ |
279 | status = ioctl (fd, DEVMTAB_GET_FILESYSTEMS, fslist); | 279 | status = ioctl (fd, DEVMTAB_GET_FILESYSTEMS, fslist); |
@@ -343,7 +343,7 @@ extern int mount_main(int argc, char **argv) | |||
343 | numfilesystems = ioctl (fd, DEVMTAB_COUNT_MOUNTS); | 343 | numfilesystems = ioctl (fd, DEVMTAB_COUNT_MOUNTS); |
344 | if (numfilesystems<0) | 344 | if (numfilesystems<0) |
345 | fatalError( "\nDEVMTAB_COUNT_MOUNTS: %s\n", strerror (errno)); | 345 | fatalError( "\nDEVMTAB_COUNT_MOUNTS: %s\n", strerror (errno)); |
346 | mntentlist = (struct k_mntent *) calloc ( numfilesystems, sizeof(struct k_mntent)); | 346 | mntentlist = (struct k_mntent *) xcalloc ( numfilesystems, sizeof(struct k_mntent)); |
347 | 347 | ||
348 | /* Grab the list of mounted filesystems */ | 348 | /* Grab the list of mounted filesystems */ |
349 | if (ioctl (fd, DEVMTAB_GET_MOUNTS, mntentlist)<0) | 349 | if (ioctl (fd, DEVMTAB_GET_MOUNTS, mntentlist)<0) |