summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernhard Voelker <mail@bernhard-voelker.de>2013-07-22 12:11:32 +0200
committerBernhard Voelker <mail@bernhard-voelker.de>2013-07-22 14:42:08 +0200
commit68e5e8886170a3c2af88f830f2ac36100a9a610b (patch)
tree78dc9977c279db6c304cd3af5e2ce2c796b400ea
parent0c452fe97a395a1ecc2cacce3609ea6be366ac8e (diff)
downloadcoreutils-68e5e8886170a3c2af88f830f2ac36100a9a610b.tar.xz
maint: use new gnulib function to free mount entries in du
* src/du.c (fill_mount_table): Use free_mount_entry() instead of freeing struct members manually.
-rw-r--r--src/du.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/du.c b/src/du.c
index 1aa5a1675..a6fa16b29 100644
--- a/src/du.c
+++ b/src/du.c
@@ -670,12 +670,7 @@ fill_mount_table (void)
mnt_free = mnt_ent;
mnt_ent = mnt_ent->me_next;
-
- free (mnt_free->me_devname);
- free (mnt_free->me_mountdir);
- if (mnt_free->me_type_malloced)
- free (mnt_free->me_type);
- free (mnt_free);
+ free_mount_entry (mnt_free);
}
}