From: Mike Gorse Date: Mon, 20 Aug 2012 19:36:52 +0000 (-0500) Subject: Don't leak GError when option parsing fails X-Git-Tag: AT_SPI2_ATK_2_12_0~88 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9d4303a988196876bc06eeb92d95db7d36374939;p=platform%2Fcore%2Fuifw%2Fat-spi2-atk.git Don't leak GError when option parsing fails https://bugzilla.gnome.org/show_bug.cgi?id=679296 --- diff --git a/atk-adaptor/bridge.c b/atk-adaptor/bridge.c index 96fdbf9..3c55d6c 100644 --- a/atk-adaptor/bridge.c +++ b/atk-adaptor/bridge.c @@ -795,7 +795,10 @@ atk_bridge_adaptor_init (gint * argc, gchar ** argv[]) g_option_context_add_main_entries (opt, atspi_option_entries, NULL); g_option_context_set_ignore_unknown_options (opt, TRUE); if (!g_option_context_parse (opt, argc, argv, &err)) - g_warning ("AT-SPI Option parsing failed: %s\n", err->message); + { + g_warning ("AT-SPI Option parsing failed: %s\n", err->message); + g_error_free (err); + } g_option_context_free (opt); /* Allocate global data and do ATK initializations */