summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Taylor <rob.taylor@codethink.co.uk>2007-08-08 16:26:08 +0100
committerRob Taylor <rob.taylor@codethink.co.uk>2007-08-08 16:26:08 +0100
commit1c81985f3f5198649d07573d7501a8ef6bb90ab6 (patch)
tree2a57bb9e1585d0276d1c4a640de3c66c453278af
parentfd6a9c0525726aa3a030727e779d8f03a454b72d (diff)
try to free up some more memory
Moves g_option_context_free earlier, and calls dbus_shutdown at end. The dbus_shutdown call is not really necessary but lets us know when we're leaking dbus connections. Moving g_option_context_free earlier doesnt help an awful lot as valgrind still reports leaks in the GOptionContext code...
-rw-r--r--ohmd/ohm-main.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ohmd/ohm-main.c b/ohmd/ohm-main.c
index c166008..fd615bd 100644
--- a/ohmd/ohm-main.c
+++ b/ohmd/ohm-main.c
@@ -136,6 +136,7 @@ main (int argc, char *argv[])
textdomain (GETTEXT_PACKAGE);
g_option_context_add_main_entries (context, entries, GETTEXT_PACKAGE);
g_option_context_parse (context, &argc, &argv, &error);
+ g_option_context_free (context);
if (g_fatal_warnings || g_fatal_critical)
{
@@ -189,7 +190,8 @@ main (int argc, char *argv[])
g_object_unref (manager);
dbus_g_connection_unref (connection);
- g_option_context_free (context);
+ /*free memory used by dbus*/
+ dbus_shutdown();
return 0;
}