diff options
Diffstat (limited to 'src/cli')
-rw-r--r-- | src/cli/report.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/cli/report.cpp b/src/cli/report.cpp index ff18d19c..ebbe8e0b 100644 --- a/src/cli/report.cpp +++ b/src/cli/report.cpp @@ -649,14 +649,8 @@ static int run_events(const char *dump_dir_name, for (GList *li = env_list; li; li = g_list_next(li)) { char *s = (char*)li->data; - /* Need to make a copy: just cutting s at '=' and unsetenv'ing - * the result would be a bug! s _itself_ is in environment now, - * we must not modify it there! - */ - char *name = xstrndup(s, strchrnul(s, '=') - s); - VERB3 log("Unexporting '%s'", name); - unsetenv(name); - free(name); + VERB3 log("Unexporting '%s'", s); + safe_unsetenv(s); free(s); } g_list_free(env_list); |