/pidgin/main: f07214b611a4: Fix a crash in case of Ctrl+C while ...

Tomasz Wasilczyk tomkiewicz at cpw.pidgin.im
Wed Aug 14 07:38:26 EDT 2013


Changeset: f07214b611a4dd82653033146d04862afd503ab6
Author:	 Tomasz Wasilczyk <tomkiewicz at cpw.pidgin.im>
Date:	 2013-08-14 13:38 +0200
Branch:	 default
URL: https://hg.pidgin.im/pidgin/main/rev/f07214b611a4

Description:

Fix a crash in case of Ctrl+C while booting (libgnomekeyring bug)

diffstat:

 libpurple/plugins/keyrings/gnomekeyring.c |  13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)

diffs (23 lines):

diff --git a/libpurple/plugins/keyrings/gnomekeyring.c b/libpurple/plugins/keyrings/gnomekeyring.c
--- a/libpurple/plugins/keyrings/gnomekeyring.c
+++ b/libpurple/plugins/keyrings/gnomekeyring.c
@@ -380,6 +380,19 @@ gnomekeyring_close(void)
 static gboolean
 gnomekeyring_load(PurplePlugin *plugin)
 {
+	GModule *gkr_module;
+
+	/* libgnome-keyring may crash, if was unloaded before glib main loop
+	 * termination.
+	 */
+	gkr_module = g_module_open("libgnome-keyring", 0);
+	if (gkr_module == NULL) {
+		purple_debug_info("keyring-gnome", "GNOME Keyring module not "
+			"found\n");
+		return FALSE;
+	}
+	g_module_make_resident(gkr_module);
+
 	if (!gnome_keyring_is_available()) {
 		purple_debug_info("keyring-gnome", "GNOME Keyring service is "
 			"disabled\n");



More information about the Commits mailing list