commit c70fe01eeffe530040004eae26c655dd1682f1bf Author: Ben Pfaff <b...@cs.stanford.edu> Date: Sun Jul 8 23:27:52 2012 -0700
psppire-data-editor: Unref old data_window upon change. Otherwise there's a reference leak. Found by inspection; I haven't looked for clients that actually change the data window after setting it. diff --git a/src/ui/gui/psppire-data-editor.c b/src/ui/gui/psppire-data-editor.c index 16b1393..aae4369 100644 --- a/src/ui/gui/psppire-data-editor.c +++ b/src/ui/gui/psppire-data-editor.c @@ -385,6 +385,8 @@ psppire_data_editor_set_property (GObject *object, psppire_data_editor_split_window (de, g_value_get_boolean (value)); break; case PROP_DATA_WINDOW: + if (de->data_window) + g_object_unref (de->data_window); de->data_window = g_value_get_pointer (value); g_object_ref (de->data_window); break; There doesn't seem to be anything initialising de->data_window to NULL so there is still a potential leak here. However I don't see a need to keep a reference here at all. ->data_window is used only by the do_sort function, and that cannot be called unles the window is realized. J' -- PGP Public key ID: 1024D/2DE827B3 fingerprint = 8797 A26D 0854 2EAB 0285 A290 8A67 719C 2DE8 27B3 See http://keys.gnupg.net or any PGP keyserver for public key.
signature.asc
Description: Digital signature
_______________________________________________ pspp-dev mailing list pspp-dev@gnu.org https://lists.gnu.org/mailman/listinfo/pspp-dev