coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] maint: use new gnulib function to free mount entries in du


From: Bernhard Voelker
Subject: [PATCH] maint: use new gnulib function to free mount entries in du
Date: Mon, 22 Jul 2013 12:12:48 +0200

* src/du.c (fill_mount_table): Use free_mount_entry() instead
of freeing struct members manually.
---
 src/du.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/src/du.c b/src/du.c
index 1aa5a16..a6fa16b 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);
     }
 }
 
-- 
1.8.3.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]