diff options
author | erik <erik@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2000-03-21 22:32:57 +0000 |
---|---|---|
committer | erik <erik@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2000-03-21 22:32:57 +0000 |
commit | d67b2b05efca2a57f7f25e521450c200ef38803e (patch) | |
tree | af12b114d51e9ae7a8753baf09feb9ab8d654f26 /umount.c | |
parent | cfe2ce6d7262d074b6fe0c1dea4d96df37e8a9ef (diff) | |
download | busybox-w32-d67b2b05efca2a57f7f25e521450c200ef38803e.tar.gz busybox-w32-d67b2b05efca2a57f7f25e521450c200ef38803e.tar.bz2 busybox-w32-d67b2b05efca2a57f7f25e521450c200ef38803e.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
git-svn-id: svn://busybox.net/trunk/busybox@416 69ca8d6d-28ef-0310-b511-8ec308f3f277
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; |