From 0f25d1b97167821635093cfc558d74cdff0ac521 Mon Sep 17 00:00:00 2001 From: Kjartan Maraas Date: Thu, 17 Aug 2006 07:25:03 +0000 Subject: Plug a couple leaks. 2006-08-17 Kjartan Maraas * bbdb.c: (bbdb_open_addressbook), (create_addressbook_option_menu): Plug a couple leaks. svn path=/trunk/; revision=32560 --- plugins/bbdb/ChangeLog | 5 +++++ plugins/bbdb/bbdb.c | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/bbdb/ChangeLog b/plugins/bbdb/ChangeLog index 621d19c631..d8b1378981 100644 --- a/plugins/bbdb/ChangeLog +++ b/plugins/bbdb/ChangeLog @@ -1,3 +1,8 @@ +2006-08-17 Kjartan Maraas + + * bbdb.c: (bbdb_open_addressbook), + (create_addressbook_option_menu): Plug a couple leaks. + 2006-08-03 Devashish Sharma * bbdb.c: Gaim and automatic contacts were not seen until diff --git a/plugins/bbdb/bbdb.c b/plugins/bbdb/bbdb.c index 64a00ad9f5..06b0289455 100644 --- a/plugins/bbdb/bbdb.c +++ b/plugins/bbdb/bbdb.c @@ -278,8 +278,11 @@ bbdb_open_addressbook (int type) g_object_unref (G_OBJECT (gconf)); if (uri == NULL) book = e_book_new_system_addressbook (&error); - else + else { book = e_book_new_from_uri (uri, &error); + g_free (uri); + } + if (book == NULL) { g_warning ("bbdb: failed to get addressbook: %s\n", error->message); g_error_free (error); @@ -403,6 +406,7 @@ create_addressbook_option_menu (struct bbdb_stuff *stuff, int type) if (selected_source_uri != NULL) { selected_source = e_source_new_with_absolute_uri ("", selected_source_uri); e_source_option_menu_select (E_SOURCE_OPTION_MENU (menu), selected_source); + g_free (selected_source_uri); } gtk_widget_show (menu); -- cgit v1.2.3