From 945eb8f50b1b6609c4478b13c759703c4fbfa861 Mon Sep 17 00:00:00 2001 From: bubulle Date: Sun, 28 Jul 2013 14:16:09 +0200 Subject: [PATCH] if using the static char* for pw_dir, strdup it so pw_free() can be used. (Closes: Debian#691459) --- ChangeLog | 2 ++ libmisc/setupenv.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) 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); } /* -- 2.40.0