coreutils
[Top][All Lists]
Advanced

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

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


From: Pádraig Brady
Subject: Re: [PATCH] maint: use new gnulib function to free mount entries in du
Date: Mon, 22 Jul 2013 13:29:13 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2

On 07/22/2013 11:12 AM, Bernhard Voelker wrote:
> * 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 thanks!
Pádraig




reply via email to

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