aboutsummaryrefslogtreecommitdiff
path: root/libbb/mtab.c
diff options
context:
space:
mode:
Diffstat (limited to 'libbb/mtab.c')
-rw-r--r--libbb/mtab.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/libbb/mtab.c b/libbb/mtab.c
index 57654a695..2c171322a 100644
--- a/libbb/mtab.c
+++ b/libbb/mtab.c
@@ -27,14 +27,14 @@ void FAST_FUNC erase_mtab(const char *name)
27 } 27 }
28 28
29 while ((m = getmntent(mountTable)) != 0) { 29 while ((m = getmntent(mountTable)) != 0) {
30 entries = xrealloc(entries, 3, count);
31 entries[count].mnt_fsname = xstrdup(m->mnt_fsname);
32 entries[count].mnt_dir = xstrdup(m->mnt_dir);
33 entries[count].mnt_type = xstrdup(m->mnt_type);
34 entries[count].mnt_opts = xstrdup(m->mnt_opts);
35 entries[count].mnt_freq = m->mnt_freq;
36 entries[count].mnt_passno = m->mnt_passno;
30 i = count++; 37 i = count++;
31 entries = xrealloc(entries, count * sizeof(entries[0]));
32 entries[i].mnt_fsname = xstrdup(m->mnt_fsname);
33 entries[i].mnt_dir = xstrdup(m->mnt_dir);
34 entries[i].mnt_type = xstrdup(m->mnt_type);
35 entries[i].mnt_opts = xstrdup(m->mnt_opts);
36 entries[i].mnt_freq = m->mnt_freq;
37 entries[i].mnt_passno = m->mnt_passno;
38 } 38 }
39 endmntent(mountTable); 39 endmntent(mountTable);
40 40