[evolution-patches] EBookListener leak
- From: Ross Burton <ross burtonini com>
- To: Evolution Patches <evolution-patches lists ximian com>
- Subject: [evolution-patches] EBookListener leak
- Date: Mon, 04 Jul 2005 15:54:45 +0100
Hi,
Attached is a re-posting of a patch to free the private data when
freeing an EBookListener.
Ross
--
Ross Burton mail: ross burtonini com
jabber: ross burtonini com
www: http://www.burtonini.com./
PGP Fingerprint: 1A21 F5B0 D8D0 CFE3 81D4 E25A 2D09 E447 D0B4 33DF
Index: addressbook/libebook/e-book-listener.c
===================================================================
--- addressbook/libebook/e-book-listener.c (.../upstream/current) (revision 126)
+++ addressbook/libebook/e-book-listener.c (.../trunk) (revision 126)
@@ -437,6 +437,18 @@
}
static void
+e_book_listener_finalize (GObject *object)
+{
+ EBookListener *listener = E_BOOK_LISTENER (object);
+ if (listener->priv) {
+ g_free (listener->priv);
+ listener->priv = NULL;
+ }
+ if (G_OBJECT_CLASS (parent_class)->finalize)
+ G_OBJECT_CLASS (parent_class)->finalize (object);
+}
+
+static void
e_book_listener_class_init (EBookListenerClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
@@ -472,6 +484,8 @@
epv->notifyWritable = impl_BookListener_report_writable;
epv->notifyConnectionStatus = impl_BookListener_report_link_status;
epv->notifyAuthRequired = impl_BookListener_report_auth_required;
+
+ object_class->finalize = e_book_listener_finalize;
}
BONOBO_TYPE_FUNC_FULL (
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]