diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2007-10-02 19:54:42 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@src.gnome.org> | 2007-10-02 19:54:42 +0800 |
commit | 09d4af6fff63dd112b8bb42087f14f7018e2f78c (patch) | |
tree | 991537a9ea1d8487334f6fb299098daf425f9db8 /tools | |
parent | 79521efaeecfbaf717e465670fcd2724aea53578 (diff) | |
download | gsoc2013-evolution-09d4af6fff63dd112b8bb42087f14f7018e2f78c.tar gsoc2013-evolution-09d4af6fff63dd112b8bb42087f14f7018e2f78c.tar.gz gsoc2013-evolution-09d4af6fff63dd112b8bb42087f14f7018e2f78c.tar.bz2 gsoc2013-evolution-09d4af6fff63dd112b8bb42087f14f7018e2f78c.tar.lz gsoc2013-evolution-09d4af6fff63dd112b8bb42087f14f7018e2f78c.tar.xz gsoc2013-evolution-09d4af6fff63dd112b8bb42087f14f7018e2f78c.tar.zst gsoc2013-evolution-09d4af6fff63dd112b8bb42087f14f7018e2f78c.zip |
** Fixes bug #469657
2007-10-02 Matthew Barnes <mbarnes@redhat.com>
** Fixes bug #469657
* addressbook/importers/evolution-ldif-importer.c:
* calendar/gui/comp-editor-factory.c:
* composer/e-msg-composer.c:
* e-util/e-config-listener.c:
* mail/em-composer-prefs.c:
* mail/em-folder-tree-model.c:
* mail/em-format.c:
* mail/em-format-html.c:
* mail/em-migrate.c:
* mail/em-subscribe-editor.c:
* mail/mail-component.c:
* mail/mail-send-recv.c:
* mail/message-list.c:
* mail/importers/elm-importer.c:
* plugins/exchange-operations/exchange-folder-size-display.c:
* plugins/mono/mono-plugin.c:
* shell/e-shell-settings-dialog.c:
* tools/killev.c:
* widgets/table/e-table-extras.c:
* widgets/table/e-table-selection-model.c:
Use destroy functions in GHashTables to simplify memory management.
svn path=/trunk/; revision=34344
Diffstat (limited to 'tools')
-rw-r--r-- | tools/killev.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/tools/killev.c b/tools/killev.c index d0b0023278..853f5c4bc0 100644 --- a/tools/killev.c +++ b/tools/killev.c @@ -87,10 +87,9 @@ static const char *patterns[] = { }; static const int n_patterns = G_N_ELEMENTS (patterns); -static gboolean -kill_component (gpointer key, gpointer value, gpointer data) +static void +kill_component (KillevComponent *comp) { - KillevComponent *comp = value; char *base_name, *exe_name, *dash; int i; @@ -101,7 +100,7 @@ kill_component (gpointer key, gpointer value, gpointer data) if (kill_process (exe_name, comp)) { g_free (exe_name); g_free (base_name); - return TRUE; + return; } g_free (exe_name); } @@ -113,7 +112,6 @@ kill_component (gpointer key, gpointer value, gpointer data) } g_free (base_name); - return TRUE; } static void @@ -200,10 +198,13 @@ main (int argc, char **argv) while (*language_names != NULL) languages = g_slist_append (languages, *language_names++); - components = g_hash_table_new (g_str_hash, g_str_equal); + components = g_hash_table_new_full ( + g_str_hash, g_str_equal, + (GDestroyNotify) NULL, + (GDestroyNotify) kill_component); add_matching_repo_id ("IDL:GNOME/Evolution/Shell:" BASE_VERSION); - g_hash_table_foreach_remove (components, kill_component, NULL); + g_hash_table_remove_all (components); add_matching_repo_id ("IDL:GNOME/Evolution/Component:" BASE_VERSION); add_matching_repo_id ("IDL:GNOME/Evolution/DataServer/CalFactory:" DATASERVER_API_VERSION); @@ -214,8 +215,9 @@ main (int argc, char **argv) add_matching_iid ("OAFIID:GNOME_Evolution_Calendar_AlarmNotify_Factory:" BASE_VERSION); add_matching_iid ("OAFIID:GNOME_GtkHTML_Editor_Factory:3.1"); + g_hash_table_remove_all (components); - g_hash_table_foreach_remove (components, kill_component, NULL); + g_hash_table_destroy (components); return 0; } |