39 lines
1.2 KiB
Diff
39 lines
1.2 KiB
Diff
From 7e967de7dff160d7302b1ab66db3f9054b8373b3 Mon Sep 17 00:00:00 2001
|
|
From: Bastien Nocera <hadess@hadess.net>
|
|
Date: Thu, 11 Nov 2010 13:21:21 +0000
|
|
Subject: [PATCH] Fix possible double-free when destroying private windows
|
|
|
|
This could cause free'ing random data when the members of ->windows
|
|
were destroyed, but ->windows itself wasn't. As it was != NULL, we'd
|
|
be free memory that wouldn't belong to us anymore.
|
|
|
|
https://bugzilla.gnome.org/show_bug.cgi?id=634534
|
|
---
|
|
libgnome-desktop/gnome-rr-labeler.c | 5 +++++
|
|
1 files changed, 5 insertions(+), 0 deletions(-)
|
|
|
|
diff --git a/libgnome-desktop/gnome-rr-labeler.c b/libgnome-desktop/gnome-rr-labeler.c
|
|
index 1de4569..ebf9905 100644
|
|
--- a/libgnome-desktop/gnome-rr-labeler.c
|
|
+++ b/libgnome-desktop/gnome-rr-labeler.c
|
|
@@ -411,11 +411,16 @@ gnome_rr_labeler_hide (GnomeRRLabeler *labeler)
|
|
|
|
g_return_if_fail (GNOME_IS_RR_LABELER (labeler));
|
|
|
|
+ if (labeler->windows == NULL)
|
|
+ return;
|
|
+
|
|
for (i = 0; i < labeler->num_outputs; i++)
|
|
if (labeler->windows[i] != NULL) {
|
|
gtk_widget_destroy (labeler->windows[i]);
|
|
labeler->windows[i] = NULL;
|
|
}
|
|
+ g_free (labeler->windows);
|
|
+ labeler->windows = NULL;
|
|
}
|
|
|
|
void
|
|
--
|
|
1.7.3.2
|
|
|