* 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
This commit is contained in:
@@ -89,8 +89,7 @@ void mtab_read(void)
|
||||
return;
|
||||
}
|
||||
while ((e = getmntent(fp))) {
|
||||
entry = malloc(sizeof(struct _mtab_entry_t));
|
||||
|
||||
entry = xmalloc(sizeof(struct _mtab_entry_t));
|
||||
entry->device = strdup(e->mnt_fsname);
|
||||
entry->mountpt = strdup(e->mnt_dir);
|
||||
entry->next = mtab_cache;
|
||||
|
Reference in New Issue
Block a user