diff options
author | marcus <marcus@FreeBSD.org> | 2009-05-06 09:04:53 +0800 |
---|---|---|
committer | marcus <marcus@FreeBSD.org> | 2009-05-06 09:04:53 +0800 |
commit | 7c2023761b4d42cd39dbeac0bfb8b8b07827f996 (patch) | |
tree | 747d573aa0da3f8e5e9568f7b439775313205254 /x11 | |
parent | cd73f191d95e10a2ed2b8d62b4f65fc533255bf2 (diff) | |
download | freebsd-ports-gnome-7c2023761b4d42cd39dbeac0bfb8b8b07827f996.tar.gz freebsd-ports-gnome-7c2023761b4d42cd39dbeac0bfb8b8b07827f996.tar.zst freebsd-ports-gnome-7c2023761b4d42cd39dbeac0bfb8b8b07827f996.zip |
Fix a boneheaded mistake in my initial cwd patch by not using memory after
it is freed.
Submitted by: Jilles Tjoelker <jilles@stack.nl>
Diffstat (limited to 'x11')
-rw-r--r-- | x11/gnome-terminal/Makefile | 2 | ||||
-rw-r--r-- | x11/gnome-terminal/files/patch-src_terminal-screen.c | 15 |
2 files changed, 10 insertions, 7 deletions
diff --git a/x11/gnome-terminal/Makefile b/x11/gnome-terminal/Makefile index 025de1770f2c..4b3581048e98 100644 --- a/x11/gnome-terminal/Makefile +++ b/x11/gnome-terminal/Makefile @@ -8,7 +8,7 @@ PORTNAME= gnome-terminal PORTVERSION= 2.26.1 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= x11 gnome MASTER_SITES= GNOME DIST_SUBDIR= gnome2 diff --git a/x11/gnome-terminal/files/patch-src_terminal-screen.c b/x11/gnome-terminal/files/patch-src_terminal-screen.c index 2403403806e9..e283146a72e6 100644 --- a/x11/gnome-terminal/files/patch-src_terminal-screen.c +++ b/x11/gnome-terminal/files/patch-src_terminal-screen.c @@ -1,5 +1,5 @@ ---- src/terminal-screen.c.orig 2009-05-03 15:29:53.153369000 -0400 -+++ src/terminal-screen.c 2009-05-03 15:30:35.000000000 -0400 +--- src/terminal-screen.c.orig 2009-04-12 15:40:23.000000000 +0200 ++++ src/terminal-screen.c 2009-05-06 00:30:39.000000000 +0200 @@ -18,6 +18,15 @@ #include <config.h> @@ -16,7 +16,7 @@ #include <string.h> #include <stdlib.h> #include <unistd.h> -@@ -1744,10 +1753,22 @@ terminal_screen_get_dynamic_icon_title ( +@@ -1744,10 +1753,22 @@ char* terminal_screen_get_current_dir (TerminalScreen *screen) { @@ -39,7 +39,7 @@ TerminalScreenPrivate *priv = screen->priv; int fgpid; guint i; -@@ -1767,6 +1788,7 @@ terminal_screen_get_current_dir (Termina +@@ -1767,6 +1788,7 @@ if (fgpid == -1) return g_strdup (priv->initial_working_directory); @@ -47,7 +47,7 @@ /* Try to get the working directory using various OS-specific mechanisms */ for (i = 0; i < G_N_ELEMENTS (patterns); ++i) { -@@ -1804,6 +1826,45 @@ terminal_screen_get_current_dir (Termina +@@ -1804,6 +1826,48 @@ return working_dir; } } @@ -83,8 +83,11 @@ +#endif /* HAVE_KINFO_GETFILE */ + if (kif->kf_fd == KF_FD_TYPE_CWD) + { ++ char *working_dir; ++ ++ working_dir = g_strdup (kif->kf_path); + g_free (freep); -+ return g_strdup (kif->kf_path); ++ return working_dir; + } + } + g_free (freep); |