diff options
author | Matthias Clasen <mclasen@fedoraproject.org> | 2008-09-19 23:06:30 +0000 |
---|---|---|
committer | Matthias Clasen <mclasen@fedoraproject.org> | 2008-09-19 23:06:30 +0000 |
commit | 1a70e8059ab3667baf231923a8377901611e7dc5 (patch) | |
tree | 23c70932c12fd01f3cd599707eea7fa1e53dd926 | |
parent | 7d89b1f781e65638f433dae64f8d8af8ed8ba7a0 (diff) | |
download | metacity-1a70e8059ab3667baf231923a8377901611e7dc5.tar.gz metacity-1a70e8059ab3667baf231923a8377901611e7dc5.tar.xz metacity-1a70e8059ab3667baf231923a8377901611e7dc5.zip |
fix memory leaks
-rw-r--r-- | leaks.patch | 14 | ||||
-rw-r--r-- | metacity.spec | 11 | ||||
-rw-r--r-- | string-leak.patch | 20 |
3 files changed, 44 insertions, 1 deletions
diff --git a/leaks.patch b/leaks.patch new file mode 100644 index 0000000..68f524a --- /dev/null +++ b/leaks.patch @@ -0,0 +1,14 @@ +diff -up metacity-2.23.610/src/core/edge-resistance.c.leaks metacity-2.23.610/src/core/edge-resistance.c +--- metacity-2.23.610/src/core/edge-resistance.c.leaks 2008-09-14 22:39:38.000000000 -0400 ++++ metacity-2.23.610/src/core/edge-resistance.c 2008-09-14 22:43:28.000000000 -0400 +@@ -985,8 +985,8 @@ meta_display_compute_resistance_and_snap + cur_window_iter = cur_window_iter->next; + } + /* Put 'em in bottom to top order */ +- rem_windows = g_slist_reverse (obscuring_windows); +- rem_win_stacking = g_slist_reverse (window_stacking); ++ rem_windows = obscuring_windows = g_slist_reverse (obscuring_windows); ++ rem_win_stacking = window_stacking = g_slist_reverse (window_stacking); + + /* + * 3rd: loop over the windows again, this time getting the edges from diff --git a/metacity.spec b/metacity.spec index 860865e..f32a577 100644 --- a/metacity.spec +++ b/metacity.spec @@ -1,12 +1,16 @@ Summary: Metacity window manager Name: metacity Version: 2.23.610 -Release: 1%{?dist} +Release: 2%{?dist} URL: http://download.gnome.org/sources/metacity/ Source0: http://download.gnome.org/sources/metacity/2.23/metacity-%{version}.tar.bz2 Patch0: default-theme.patch # http://bugzilla.gnome.org/show_bug.cgi?id=482354 Patch1: metacity-2.21.13-dont-move-windows.patch +# http://bugzilla.gnome.org/show_bug.cgi?id=552303 +Patch2: leaks.patch +# http://bugzilla.gnome.org/show_bug.cgi?id=552307 +Patch3: string-leak.patch License: GPLv2+ Group: User Interface/Desktops @@ -63,6 +67,8 @@ API. This package exists purely for technical reasons. %setup -q %patch0 -p1 -b .default-theme %patch1 -p0 -b .dont-move-windows +%patch2 -p1 -b .leaks +%patch3 -p1 -b .string-leak %build rm -rf $RPM_BUILD_ROOT @@ -155,6 +161,9 @@ fi %{_mandir}/man1/metacity-window-demo.1.gz %changelog +* FRi Sep 19 2008 Matthias Clasen <mclasen@redhat.com> - 2.23.610-2 +- Fix some memory leaks + * Tue Sep 9 2008 Matthias Clasen <mclasen@redhat.com> - 2.23.610-1 - Update to 2.23.610 diff --git a/string-leak.patch b/string-leak.patch new file mode 100644 index 0000000..19a25ad --- /dev/null +++ b/string-leak.patch @@ -0,0 +1,20 @@ +diff -up metacity-2.23.610/src/ui/ui.c.string-leak metacity-2.23.610/src/ui/ui.c +--- metacity-2.23.610/src/ui/ui.c.string-leak 2008-08-18 08:29:07.000000000 -0400 ++++ metacity-2.23.610/src/ui/ui.c 2008-09-15 18:05:20.000000000 -0400 +@@ -657,10 +657,12 @@ meta_text_property_to_utf8 (Display + &list); + + if (count == 0) +- return NULL; +- +- retval = list[0]; +- list[0] = g_strdup (""); /* something to free */ ++ retval = NULL; ++ else ++ { ++ retval = list[0]; ++ list[0] = g_strdup (""); /* something to free */ ++ } + + g_strfreev (list); + |