diff options
| author | Karel Klic <kklic@redhat.com> | 2011-03-09 16:49:41 +0100 |
|---|---|---|
| committer | Karel Klic <kklic@redhat.com> | 2011-03-09 16:58:28 +0100 |
| commit | 43d84e3f11e46b7c9a042ff338024dfc41bb4f22 (patch) | |
| tree | 783b1122556f15345290ff8b1623812b6e864827 /src/cli | |
| parent | 6ec12db137f2d0fe18f059fcef2390512d0b2c3f (diff) | |
| parent | c2f2a9f310e7b3bc3725cc8dc7e805fd38c7fbbd (diff) | |
| download | abrt-43d84e3f11e46b7c9a042ff338024dfc41bb4f22.tar.gz abrt-43d84e3f11e46b7c9a042ff338024dfc41bb4f22.tar.xz abrt-43d84e3f11e46b7c9a042ff338024dfc41bb4f22.zip | |
Merge branch 'master' of ssh://git.fedorahosted.org/git/abrt
Diffstat (limited to 'src/cli')
| -rw-r--r-- | src/cli/Makefile.am | 2 | ||||
| -rw-r--r-- | src/cli/report.cpp | 10 |
2 files changed, 3 insertions, 9 deletions
diff --git a/src/cli/Makefile.am b/src/cli/Makefile.am index 0a5c6e1a..345598d0 100644 --- a/src/cli/Makefile.am +++ b/src/cli/Makefile.am @@ -13,7 +13,7 @@ abrt_cli_CPPFLAGS = \ $(ENABLE_SOCKET_OR_DBUS) \ $(DBUS_CFLAGS) $(GLIB_CFLAGS) \ -D_GNU_SOURCE \ - -Wall -Werror + -Wall -Wwrite-strings -Werror # $(GTK_CFLAGS) abrt_cli_LDADD = \ ../lib/libreport.la \ 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); |
