diff options
| author | Sushma Rai <rsushma@src.gnome.org> | 2005-05-17 06:58:24 +0000 |
|---|---|---|
| committer | Sushma Rai <rsushma@src.gnome.org> | 2005-05-17 06:58:24 +0000 |
| commit | 7b4a2a9488aec2aa2d5656e6dd021c2a86f92438 (patch) | |
| tree | 801c018c0ba84e47a889beedcd1e5db72c03d4f6 | |
| parent | 295d663670c5a0afd766c3fa446913c64842f6c2 (diff) | |
| download | evolution-data-server-7b4a2a9488aec2aa2d5656e6dd021c2a86f92438.tar.gz | |
Memory leak fixes.
| -rw-r--r-- | addressbook/ChangeLog | 5 | ||||
| -rw-r--r-- | addressbook/libedata-book/e-book-backend-cache.c | 6 | ||||
| -rw-r--r-- | calendar/ChangeLog | 12 | ||||
| -rw-r--r-- | calendar/backends/file/e-cal-backend-file.c | 4 | ||||
| -rw-r--r-- | calendar/backends/groupwise/e-cal-backend-groupwise.c | 29 | ||||
| -rw-r--r-- | calendar/libedata-cal/e-cal-backend-cache.c | 6 | ||||
| -rw-r--r-- | servers/groupwise/ChangeLog | 9 | ||||
| -rw-r--r-- | servers/groupwise/e-gw-connection.c | 2 | ||||
| -rw-r--r-- | servers/groupwise/e-gw-item.c | 22 |
9 files changed, 73 insertions, 22 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog index 53615b5b4..08b872e42 100644 --- a/addressbook/ChangeLog +++ b/addressbook/ChangeLog @@ -1,5 +1,10 @@ 2005-05-17 Sushma Rai <rsushma@novell.com> + * libedata-book/e-book-backend-cache.c + (e_book_backend_cache_constructor): Freeing cache file name. + +2005-05-17 Sushma Rai <rsushma@novell.com> + * libedata-book/e-book-backend-cache.c (e_book_backend_cache_get_contacts): Freeing list of cache objects and sexp. diff --git a/addressbook/libedata-book/e-book-backend-cache.c b/addressbook/libedata-book/e-book-backend-cache.c index 342b5232a..83858a6e7 100644 --- a/addressbook/libedata-book/e-book-backend-cache.c +++ b/addressbook/libedata-book/e-book-backend-cache.c @@ -142,6 +142,7 @@ e_book_backend_cache_constructor (GType type, { GObject *obj; const char *uri; + char *cache_file; EBookBackendCacheClass *klass; GObjectClass *parent_class; @@ -155,7 +156,10 @@ e_book_backend_cache_constructor (GType type, /* extract uid */ if (!g_ascii_strcasecmp ( g_param_spec_get_name (construct_properties->pspec), "uri")) { uri = g_value_get_string (construct_properties->value); - g_object_set (obj, "filename", get_filename_from_uri (uri), NULL); + cache_file = get_filename_from_uri (uri); + if (cache_file) + g_object_set (obj, "filename", cache_file, NULL); + g_free (cache_file); } return obj; diff --git a/calendar/ChangeLog b/calendar/ChangeLog index 9bcfe7b57..94a620e6f 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,15 @@ +2005-05-17 Sushma Rai <rsushma@novell.com> + + * libedata-cal/e-cal-backend-cache.c (e_cal_backend_cache_constructor): + Freeing cache file name. + + * calendar/backends/groupwise/e-cal-backend-groupwise.c (get_deltas): + Checking for server time value, though typically this should never be NULL. + (e_cal_backend_groupwise_get_object_list): Unref cbsexp. + + * calendar/backends/file/e-cal-backend-file.c + (e_cal_backend_file_get_object_list)(create_user_free_busy): Unref sexp. + 2005-04-18 Chenthill Palanisamy <pchenthill@novell.com> Fixes #274409 diff --git a/calendar/backends/file/e-cal-backend-file.c b/calendar/backends/file/e-cal-backend-file.c index cf348cd99..dc6c1870b 100644 --- a/calendar/backends/file/e-cal-backend-file.c +++ b/calendar/backends/file/e-cal-backend-file.c @@ -1252,6 +1252,8 @@ e_cal_backend_file_get_object_list (ECalBackendSync *backend, EDataCal *cal, con g_hash_table_foreach (priv->comp_uid_hash, (GHFunc) match_object_sexp, &match_data); *objects = match_data.obj_list; + + g_object_unref (match_data.obj_sexp); return GNOME_Evolution_Calendar_Success; } @@ -1295,6 +1297,7 @@ e_cal_backend_file_start_query (ECalBackend *backend, EDataCalView *query) g_list_foreach (match_data.obj_list, (GFunc) g_free, NULL); g_list_free (match_data.obj_list); } + g_object_unref (match_data.obj_sexp); e_data_cal_view_notify_done (query, GNOME_Evolution_Calendar_Success); } @@ -1403,6 +1406,7 @@ create_user_free_busy (ECalBackendFile *cbfile, const char *address, const char vcalendar_comp, priv->default_zone); } + g_object_unref (obj_sexp); return vfb; } diff --git a/calendar/backends/groupwise/e-cal-backend-groupwise.c b/calendar/backends/groupwise/e-cal-backend-groupwise.c index 381c4084a..adda0a4fd 100644 --- a/calendar/backends/groupwise/e-cal-backend-groupwise.c +++ b/calendar/backends/groupwise/e-cal-backend-groupwise.c @@ -196,6 +196,7 @@ get_deltas (gpointer handle) char *comp_str; char *time_string = NULL; char t_str [100]; + const char *serv_time; struct stat buf; static GStaticMutex connecting = G_STATIC_MUTEX_INIT; @@ -213,20 +214,23 @@ get_deltas (gpointer handle) g_static_mutex_lock (&connecting); - g_strlcpy (t_str, e_cal_backend_cache_get_server_utc_time (cache), 100); - if (!*t_str || !strcmp (t_str, "")) { - icaltimetype temp; - time_t current_time; - const struct tm *tm; - - g_warning (" Could not get the correct time stamp for using in getQuick Messages\n"); - temp = icaltime_current_time_with_zone (icaltimezone_get_utc_timezone ()); - current_time = icaltime_as_timet_with_zone (temp, icaltimezone_get_utc_timezone ()); - tm = gmtime (¤t_time); - strftime (t_str, 100, "%Y-%m-%dT%H:%M:%SZ", tm); + serv_time = e_cal_backend_cache_get_server_utc_time (cache); + if (serv_time) { + g_strlcpy (t_str, e_cal_backend_cache_get_server_utc_time (cache), 100); + if (!*t_str || !strcmp (t_str, "")) { + icaltimetype temp; + time_t current_time; + const struct tm *tm; + + g_warning (" Could not get the correct time stamp for using in getQuick Messages\n"); + temp = icaltime_current_time_with_zone (icaltimezone_get_utc_timezone ()); + current_time = icaltime_as_timet_with_zone (temp, icaltimezone_get_utc_timezone ()); + tm = gmtime (¤t_time); + strftime (t_str, 100, "%Y-%m-%dT%H:%M:%SZ", tm); + } + time_string = g_strdup (t_str); } - time_string = g_strdup (t_str); status = e_gw_connection_get_quick_messages (cnc, cbgw->priv->container_id, "attachments recipients message recipientStatus default peek", &time_string, "New", "CalendarItem", NULL, -1, &item_list); if (status == E_GW_CONNECTION_STATUS_INVALID_CONNECTION) @@ -1168,6 +1172,7 @@ e_cal_backend_groupwise_get_object_list (ECalBackendSync *backend, EDataCal *cal } } + g_object_unref (cbsexp); g_list_foreach (components, (GFunc) g_object_unref, NULL); g_list_free (components); diff --git a/calendar/libedata-cal/e-cal-backend-cache.c b/calendar/libedata-cal/e-cal-backend-cache.c index 1b0cdf530..589e0c267 100644 --- a/calendar/libedata-cal/e-cal-backend-cache.c +++ b/calendar/libedata-cal/e-cal-backend-cache.c @@ -166,8 +166,12 @@ e_cal_backend_cache_constructor (GType type, /* extract uid */ if (!g_ascii_strcasecmp ( g_param_spec_get_name (construct_properties->pspec), "uri")) { + char *cache_file; + uri = g_value_get_string (construct_properties->value); - g_object_set (obj, "filename", get_filename_from_uri (uri), NULL); + cache_file = get_filename_from_uri (uri); + g_object_set (obj, "filename", cache_file, NULL); + g_free (cache_file); } return obj; diff --git a/servers/groupwise/ChangeLog b/servers/groupwise/ChangeLog index 1432c3761..b6d1de497 100644 --- a/servers/groupwise/ChangeLog +++ b/servers/groupwise/ChangeLog @@ -1,3 +1,12 @@ +2005-05-17 Sushma Rai <rsushma@novell.com> + + * e-gw-item.c (set_contact_fields_from_soap_parameter): Freeing value, + postal_address. + (e_gw_item_new_from_soap_parameter): Freeing "to", priority. + + * servers/groupwise/e-gw-connection.c + (e_gw_connection_get_quick_messages): Checking for NULL start date. + 2005-04-07 Parthasarathi Susarla <sparthasarathi@novell.com> * e-gw-connection.c: (e_gw_connection_get_quick_messages): diff --git a/servers/groupwise/e-gw-connection.c b/servers/groupwise/e-gw-connection.c index 062fa5329..90da6198b 100644 --- a/servers/groupwise/e-gw-connection.c +++ b/servers/groupwise/e-gw-connection.c @@ -2132,7 +2132,7 @@ EGwConnectionStatus e_gw_connection_get_quick_messages (EGwConnection *cnc, cons msg = e_gw_message_new_with_header (cnc->priv->uri, cnc->priv->session_id, "getQuickMessagesRequest"); e_gw_message_write_string_parameter (msg, "list", NULL, message_list); - if (start_date) + if (start_date && *start_date) e_gw_message_write_string_parameter (msg, "startDate", NULL, *start_date); if (container) e_gw_message_write_string_parameter (msg, "container", NULL, container); diff --git a/servers/groupwise/e-gw-item.c b/servers/groupwise/e-gw-item.c index e4b213f3d..4bebbcf72 100644 --- a/servers/groupwise/e-gw-item.c +++ b/servers/groupwise/e-gw-item.c @@ -1021,8 +1021,12 @@ set_contact_fields_from_soap_parameter (EGwItem *item, SoupSoapParameter *param) } for ( temp = soup_soap_parameter_get_first_child (subparam); temp != NULL; temp = soup_soap_parameter_get_next_child (temp)) { value = soup_soap_parameter_get_string_value (temp); - if (value && (!primary_email || !g_str_equal (primary_email, value))) - item->priv->email_list = g_list_append (item->priv->email_list, value); + if (value) { + if (!primary_email || !g_str_equal (primary_email, value)) + item->priv->email_list = g_list_append (item->priv->email_list, value); + else + g_free (value); + } } g_free (primary_email); } @@ -1117,8 +1121,8 @@ set_contact_fields_from_soap_parameter (EGwItem *item, SoupSoapParameter *param) value = soup_soap_parameter_get_property(temp, "type"); if (value) g_hash_table_insert (item->priv->addresses, value, address); - - + else + free_postal_address (address); } } @@ -1730,8 +1734,8 @@ e_gw_item_new_from_soap_parameter (const char *email, const char *container, Sou } else if (!g_ascii_strcasecmp (name, "to")) { char *to ; to = soup_soap_parameter_get_string_value (child) ; - e_gw_item_set_to (item,to) ; - + e_gw_item_set_to (item, to); + g_free (to); } else if (!g_ascii_strcasecmp (name, "iCalId")) item->priv->icalid = soup_soap_parameter_get_string_value (child); @@ -1812,7 +1816,11 @@ e_gw_item_new_from_soap_parameter (const char *email, const char *container, Sou item->priv->place = soup_soap_parameter_get_string_value (child); else if (!g_ascii_strcasecmp (name, "taskPriority")) { - e_gw_item_set_task_priority (item, soup_soap_parameter_get_string_value (child)); + char *priority; + + priority = soup_soap_parameter_get_string_value (child); + e_gw_item_set_task_priority (item, priority); + g_free (priority); } else if (!g_ascii_strcasecmp (name, "startDate")) { |
