summaryrefslogtreecommitdiff
path: root/umount.c
diff options
context:
space:
mode:
authorErik Andersen <andersen@codepoet.org>2000-03-21 22:32:57 +0000
committerErik Andersen <andersen@codepoet.org>2000-03-21 22:32:57 +0000
commit0d068a20676144e9fd6796cc77764c420d785394 (patch)
treeaf12b114d51e9ae7a8753baf09feb9ab8d654f26 /umount.c
parentc053e41fa0524d828bf90f47e5e3637b8facaadc (diff)
downloadbusybox-w32-0d068a20676144e9fd6796cc77764c420d785394.tar.gz
busybox-w32-0d068a20676144e9fd6796cc77764c420d785394.tar.bz2
busybox-w32-0d068a20676144e9fd6796cc77764c420d785394.zip
* all mallocs now use xmalloc (and so are OOM error safe), and
the common error handling saves a few bytes. Thanks to Bob Tinsley <bob@earthrise.demon.co.uk> for the patch. -Erik
Diffstat (limited to 'umount.c')
-rw-r--r--umount.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/umount.c b/umount.c
index b0f393cca..6661db878 100644
--- a/umount.c
+++ b/umount.c
@@ -89,8 +89,7 @@ void mtab_read(void)
89 return; 89 return;
90 } 90 }
91 while ((e = getmntent(fp))) { 91 while ((e = getmntent(fp))) {
92 entry = malloc(sizeof(struct _mtab_entry_t)); 92 entry = xmalloc(sizeof(struct _mtab_entry_t));
93
94 entry->device = strdup(e->mnt_fsname); 93 entry->device = strdup(e->mnt_fsname);
95 entry->mountpt = strdup(e->mnt_dir); 94 entry->mountpt = strdup(e->mnt_dir);
96 entry->next = mtab_cache; 95 entry->next = mtab_cache;