diff options
author | Shreyas Srinivasan <sshreyas@novell.com> | 2005-07-15 18:23:16 +0800 |
---|---|---|
committer | Shreyas Srinivasan <shres@src.gnome.org> | 2005-07-15 18:23:16 +0800 |
commit | eebcdb93a5d64379a6ebd5d31be272d5da821994 (patch) | |
tree | ec1402102435517de54f556fcf48031420d43bf0 | |
parent | ceaefd37da8e2f7e9f61a5123d1b8a2c2bed909d (diff) | |
download | gsoc2013-evolution-eebcdb93a5d64379a6ebd5d31be272d5da821994.tar gsoc2013-evolution-eebcdb93a5d64379a6ebd5d31be272d5da821994.tar.gz gsoc2013-evolution-eebcdb93a5d64379a6ebd5d31be272d5da821994.tar.bz2 gsoc2013-evolution-eebcdb93a5d64379a6ebd5d31be272d5da821994.tar.lz gsoc2013-evolution-eebcdb93a5d64379a6ebd5d31be272d5da821994.tar.xz gsoc2013-evolution-eebcdb93a5d64379a6ebd5d31be272d5da821994.tar.zst gsoc2013-evolution-eebcdb93a5d64379a6ebd5d31be272d5da821994.zip |
unref the store which was being leaked.
2005-07-15 Shreyas Srinivasan <sshreyas@novell.com>
* e-msg-composer-hdrs.c: (account_can_send) unref the store which
was being leaked.
svn path=/trunk/; revision=29778
-rw-r--r-- | composer/ChangeLog | 5 | ||||
-rw-r--r-- | composer/e-msg-composer-hdrs.c | 12 |
2 files changed, 11 insertions, 6 deletions
diff --git a/composer/ChangeLog b/composer/ChangeLog index 47e0c6caea..03dacd6f1c 100644 --- a/composer/ChangeLog +++ b/composer/ChangeLog @@ -1,3 +1,8 @@ +2005-07-15 Shreyas Srinivasan <sshreyas@novell.com> + + * e-msg-composer-hdrs.c: (account_can_send) unref the store which + was being leaked. + 2005-07-14 Not Zed <NotZed@Ximian.com> * e-msg-composer-hdrs.c (address_button_clicked_cb): add casts in diff --git a/composer/e-msg-composer-hdrs.c b/composer/e-msg-composer-hdrs.c index cfadd425f9..b3e8078f3e 100644 --- a/composer/e-msg-composer-hdrs.c +++ b/composer/e-msg-composer-hdrs.c @@ -333,19 +333,19 @@ account_can_send (EAccount *account) { static CamelStore *store; CamelException ex; + gboolean result = FALSE; if (!account->parent_uid) return TRUE; - if (!(store = (CamelStore *) camel_session_get_service (session, e_account_get_string(account, E_ACCOUNT_SOURCE_URL), CAMEL_PROVIDER_STORE, &ex))) { + if (!(store = (CamelStore *) camel_session_get_service (session, e_account_get_string(account, E_ACCOUNT_SOURCE_URL), CAMEL_PROVIDER_STORE, &ex))) camel_exception_clear (&ex); - return FALSE; + else if (store->mode & CAMEL_STORE_WRITE) { + result = TRUE; + g_object_unref (store); } - if (store->mode & CAMEL_STORE_WRITE) - return TRUE; - - return FALSE; + return result; } static GtkWidget * |