diff --git a/ChangeLog b/ChangeLog index 94efb8fb..2ad5dffc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,8 @@ 2012-05-20 Christian Perrier * configure.in: Prepare for next point release 4.2. + * if using the static char* for pw_dir, strdup it so + pw_free() can be used. (Closes: Debian#691459) 2012-05-25 Nicolas François diff --git a/libmisc/setupenv.c b/libmisc/setupenv.c index 74170e81..992d3b81 100644 --- a/libmisc/setupenv.c +++ b/libmisc/setupenv.c @@ -228,7 +228,7 @@ void setup_env (struct passwd *info) exit (EXIT_FAILURE); } (void) puts (_("No directory, logging in with HOME=/")); - info->pw_dir = temp_pw_dir; + info->pw_dir = strdup(temp_pw_dir); } /*