diff options
author | Erik Andersen <andersen@codepoet.org> | 2000-03-21 22:32:57 +0000 |
---|---|---|
committer | Erik Andersen <andersen@codepoet.org> | 2000-03-21 22:32:57 +0000 |
commit | 0d068a20676144e9fd6796cc77764c420d785394 (patch) | |
tree | af12b114d51e9ae7a8753baf09feb9ab8d654f26 /umount.c | |
parent | c053e41fa0524d828bf90f47e5e3637b8facaadc (diff) | |
download | busybox-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.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -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; |