From 90e3e5497f9b6b7555036c776c77f2c81a4c839d Mon Sep 17 00:00:00 2001 From: Sushma Rai Date: Mon, 6 Feb 2006 08:53:21 +0000 Subject: Fixed memory leaks. Fixes #329251. svn path=/trunk/; revision=31418 --- plugins/exchange-operations/ChangeLog | 20 ++++++++++++++++++++ plugins/exchange-operations/exchange-calendar.c | 6 ++++-- plugins/exchange-operations/exchange-contacts.c | 4 +++- .../exchange-permissions-dialog.c | 6 +++++- 4 files changed, 32 insertions(+), 4 deletions(-) diff --git a/plugins/exchange-operations/ChangeLog b/plugins/exchange-operations/ChangeLog index 80a84cc338..36d4df9009 100644 --- a/plugins/exchange-operations/ChangeLog +++ b/plugins/exchange-operations/ChangeLog @@ -1,9 +1,29 @@ +2006-02-06 Sushma Rai + + * exchange-permissions-dialog.c (exchange_permissions_dialog_new): + Initializing nresults to zero and freeing E2kResult. + + * exchange-calendar.c (e_exchange_calendar_commit): Freeing authtype. + + * exchange-contacts.c (e_exchange_contacts_commit): Similar. + Fixes #329251. + 2006-02-05 Karsten Bräckelmann * exchange-user-dialog.c (e2k_user_dialog_construct): Correcting "Addressbook" to properly read "Address Book". Fixes bug #326256. +2006-02-03 Sushma Rai + + * exchange-permissions-dialog.c (exchange_permissions_dialog_new): + Freeing E2kResult. + + * exchange-calendar.c (e_exchange_calendar_commit): Freeing authtype. + + * exchange-contacts.c (e_exchange_contacts_commit): similar. + See #329251. + 2006-02-03 Sushma Rai * exchange-folder.c (org_gnome_exchange_folder_subscription): Moved diff --git a/plugins/exchange-operations/exchange-calendar.c b/plugins/exchange-operations/exchange-calendar.c index 7dfc767222..f0ebfb80e9 100644 --- a/plugins/exchange-operations/exchange-calendar.c +++ b/plugins/exchange-operations/exchange-calendar.c @@ -397,8 +397,10 @@ e_exchange_calendar_commit (EPlugin *epl, EConfigTarget *target) e_source_set_relative_uri (source, ruri); e_source_set_property (source, "username", username); e_source_set_property (source, "auth-domain", "Exchange"); - if (authtype) - e_source_set_property (source, "auth-type", authtype); + if (authtype) { + e_source_set_property (source, "auth-type", authtype); + g_free (authtype); + } e_source_set_property (source, "auth", "1"); if (!calendar_src_exists) { diff --git a/plugins/exchange-operations/exchange-contacts.c b/plugins/exchange-operations/exchange-contacts.c index 46ab1f8f7a..164a314549 100644 --- a/plugins/exchange-operations/exchange-contacts.c +++ b/plugins/exchange-operations/exchange-contacts.c @@ -365,8 +365,10 @@ e_exchange_contacts_commit (EPlugin *epl, EConfigTarget *target) e_source_set_relative_uri (source, ruri); e_source_set_property (source, "username", username); e_source_set_property (source, "auth-domain", "Exchange"); - if (authtype) + if (authtype) { e_source_set_property (source, "auth-type", authtype); + g_free (authtype); + } e_source_set_property (source, "auth", "plain/password"); if (!contacts_src_exists) { diff --git a/plugins/exchange-operations/exchange-permissions-dialog.c b/plugins/exchange-operations/exchange-permissions-dialog.c index b8a3fd45a4..9c9aaefb50 100644 --- a/plugins/exchange-operations/exchange-permissions-dialog.c +++ b/plugins/exchange-operations/exchange-permissions-dialog.c @@ -169,7 +169,7 @@ exchange_permissions_dialog_new (ExchangeAccount *account, char *title; E2kHTTPStatus status; E2kResult *results; - int nresults; + int nresults = 0; xmlNode *xml_form; GByteArray *binary_form; @@ -229,6 +229,8 @@ exchange_permissions_dialog_new (ExchangeAccount *account, lose: e_error_run (GTK_WINDOW (parent), ERROR_DOMAIN ":perm-read-error", NULL); gtk_widget_destroy (GTK_WIDGET (dialog)); + if (nresults) + e2k_results_free (results, nresults); return; } @@ -245,6 +247,8 @@ exchange_permissions_dialog_new (ExchangeAccount *account, setup_user_list (dialog); gtk_widget_show (GTK_WIDGET (dialog)); + if (nresults) + e2k_results_free (results, nresults); } static void -- cgit v1.2.3