From 697a87b69bee9e3e06b4b0d2fa73fccc56083fd5 Mon Sep 17 00:00:00 2001 From: Sergio Villar Senin Date: Mon, 3 Aug 2009 10:10:52 +0200 Subject: [PATCH] Fixes NB#130686, fixed three memory leaks --- src/hildon2/modest-maemo-utils.c | 3 +++ src/modest-main.c | 3 ++- src/modest-plugin-factory.c | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/hildon2/modest-maemo-utils.c b/src/hildon2/modest-maemo-utils.c index 2ca89a5..9b63184 100644 --- a/src/hildon2/modest-maemo-utils.c +++ b/src/hildon2/modest-maemo-utils.c @@ -193,7 +193,10 @@ modest_maemo_utils_get_device_name (void) get_default_adapter_cb (conn, msg); dbus_message_unref (msg); } + dbus_message_unref (request); + if (dbus_error_is_set (&error)) + dbus_error_free (&error); } void diff --git a/src/modest-main.c b/src/modest-main.c index 796560e..721b0bb 100644 --- a/src/modest-main.c +++ b/src/modest-main.c @@ -152,9 +152,10 @@ main (int argc, char *argv[]) g_option_context_add_group (context, gtk_get_option_group (TRUE)); if (!g_option_context_parse (context, &argc, &argv, &error)) { g_print ("option parsing failed: %s\n", error->message); + g_option_context_free (context); exit (1); } - + g_option_context_free (context); show_ui_without_top_application_method = show_ui; diff --git a/src/modest-plugin-factory.c b/src/modest-plugin-factory.c index 84d1736..a94bf9a 100644 --- a/src/modest-plugin-factory.c +++ b/src/modest-plugin-factory.c @@ -220,6 +220,7 @@ modest_plugin_factory_load (const gchar *file) g_type_module_unuse (type_module); } g_free (path); + g_free (plugin_name); return plugin; error: -- 1.7.9.5