aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2003-07-02 21:29:55 +0800
committerDan Winship <danw@src.gnome.org>2003-07-02 21:29:55 +0800
commit43d436a36ebd59699b20f6e49f544ad24c8d8a30 (patch)
treeb65aee0432b3c88a8ca33cb12e2e33e93e7dd4f7
parent55b00d2c1261b744640134260abf94d60d8d0e58 (diff)
downloadgsoc2013-evolution-43d436a36ebd59699b20f6e49f544ad24c8d8a30.tar
gsoc2013-evolution-43d436a36ebd59699b20f6e49f544ad24c8d8a30.tar.gz
gsoc2013-evolution-43d436a36ebd59699b20f6e49f544ad24c8d8a30.tar.bz2
gsoc2013-evolution-43d436a36ebd59699b20f6e49f544ad24c8d8a30.tar.lz
gsoc2013-evolution-43d436a36ebd59699b20f6e49f544ad24c8d8a30.tar.xz
gsoc2013-evolution-43d436a36ebd59699b20f6e49f544ad24c8d8a30.tar.zst
gsoc2013-evolution-43d436a36ebd59699b20f6e49f544ad24c8d8a30.zip
Don't leak exceptions (load_static_capabilities): free the capability
* cal-client/cal-client.c (real_open_calendar): Don't leak exceptions (load_static_capabilities): free the capability string * gui/dialogs/task-page.c (task_page_fill_component): Free the description text if it *was* set, rather than if it wasn't. * gui/dialogs/task-editor.c (task_editor_finalize): Free the priv struct. svn path=/trunk/; revision=21722
-rw-r--r--calendar/ChangeLog12
-rw-r--r--calendar/cal-client/cal-client.c29
-rw-r--r--calendar/gui/dialogs/task-editor.c8
-rw-r--r--calendar/gui/dialogs/task-page.c2
4 files changed, 34 insertions, 17 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index c179b7c7c2..bc7aee4d24 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,3 +1,15 @@
+2003-07-02 Dan Winship <danw@ximian.com>
+
+ * cal-client/cal-client.c (real_open_calendar): Don't leak
+ exceptions
+ (load_static_capabilities): free the capability string
+
+ * gui/dialogs/task-page.c (task_page_fill_component): Free the
+ description text if it *was* set, rather than if it wasn't.
+
+ * gui/dialogs/task-editor.c (task_editor_finalize): Free the priv
+ struct.
+
2003-07-02 Bolian Yin <bolian.yin@sun.com>
Fixes #45328, #45329
diff --git a/calendar/cal-client/cal-client.c b/calendar/cal-client/cal-client.c
index 075186b056..25e40322bb 100644
--- a/calendar/cal-client/cal-client.c
+++ b/calendar/cal-client/cal-client.c
@@ -839,10 +839,15 @@ real_open_calendar (CalClient *client, const char *str_uri, gboolean only_if_exi
GNOME_Evolution_Calendar_CalFactory_open (f->data, str_uri,
only_if_exists,
corba_listener, &ev);
- if (!BONOBO_EX (&ev))
- break;
- else if (BONOBO_USER_EX (&ev, ex_GNOME_Evolution_Calendar_CalFactory_UnsupportedMethod))
+ if (!BONOBO_EX (&ev)) {
+ if (supported != NULL)
+ *supported = TRUE;
+ return TRUE;
+ }
+
+ if (BONOBO_USER_EX (&ev, ex_GNOME_Evolution_Calendar_CalFactory_UnsupportedMethod))
unsupported++;
+ CORBA_exception_free (&ev);
}
if (supported != NULL) {
@@ -852,17 +857,13 @@ real_open_calendar (CalClient *client, const char *str_uri, gboolean only_if_exi
*supported = TRUE;
}
- if (BONOBO_EX (&ev)) {
- bonobo_object_unref (BONOBO_OBJECT (priv->listener));
- priv->listener = NULL;
- priv->load_state = CAL_CLIENT_LOAD_NOT_LOADED;
- g_free (priv->uri);
- priv->uri = NULL;
-
- return FALSE;
- }
+ bonobo_object_unref (BONOBO_OBJECT (priv->listener));
+ priv->listener = NULL;
+ priv->load_state = CAL_CLIENT_LOAD_NOT_LOADED;
+ g_free (priv->uri);
+ priv->uri = NULL;
- return TRUE;
+ return FALSE;
}
/**
@@ -1213,6 +1214,8 @@ load_static_capabilities (CalClient *client)
priv->capabilities = g_strdup (cap);
else
priv->capabilities = g_strdup ("");
+
+ CORBA_free (cap);
CORBA_exception_free (&ev);
}
diff --git a/calendar/gui/dialogs/task-editor.c b/calendar/gui/dialogs/task-editor.c
index 891520c95d..202bd5dee1 100644
--- a/calendar/gui/dialogs/task-editor.c
+++ b/calendar/gui/dialogs/task-editor.c
@@ -346,12 +346,14 @@ task_editor_finalize (GObject *object)
te = TASK_EDITOR (object);
priv = te->priv;
- g_object_unref((priv->task_page));
- g_object_unref((priv->task_details_page));
- g_object_unref((priv->meet_page));
+ g_object_unref (priv->task_page);
+ g_object_unref (priv->task_details_page);
+ g_object_unref (priv->meet_page);
g_object_unref (priv->model);
+ g_free (priv);
+
if (G_OBJECT_CLASS (parent_class)->finalize)
(* G_OBJECT_CLASS (parent_class)->finalize) (object);
}
diff --git a/calendar/gui/dialogs/task-page.c b/calendar/gui/dialogs/task-page.c
index c83473ef07..b68adba47d 100644
--- a/calendar/gui/dialogs/task-page.c
+++ b/calendar/gui/dialogs/task-page.c
@@ -464,7 +464,7 @@ task_page_fill_component (CompEditorPage *page, CalComponent *comp)
cal_component_set_description_list (comp, &l);
}
- if (!str)
+ if (str)
g_free (str);
/* Dates */