Dennis Smit <[EMAIL PROTECTED]> wrote:
...
> there is memory allocated within the read_utmp function for
> utmp_buf:
>   int fail = read_utmp (filename, &n_users, &utmp_buf);
>
> which is never being freed.
>
> This is solved by the following patch:
> ------------------
> --- users.c     2003-10-30 03:11:09.000000000 +0100
> +++ usersnew.c  2003-10-30 03:09:36.000000000 +0100
> @@ -104,6 +104,8 @@
>      error (EXIT_FAILURE, errno, "%s", filename);
>
>    list_entries_users (n_users, utmp_buf);
> +
> +  free (utmp_buf);
>  }
>
>  void

Thank you for that patch.
I've applied it, even though technically the explicit free is
unnecessary here.


_______________________________________________
Bug-coreutils mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-coreutils

Reply via email to