Fix string leak in gnc_gnome_help()

Thanks to Yawar Amin for pointing it out.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22698 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
John Ralls 2013-01-13 22:51:44 +00:00
parent 18bb5e843d
commit 19c65666d9

View File

@ -411,6 +411,7 @@ gnc_gnome_help (const char *file_name, const char *anchor)
{
GError *error = NULL;
gchar *uri = NULL;
gboolean success;
if (anchor)
uri = g_strconcat ("ghelp:", file_name, "?", anchor, NULL);
@ -418,8 +419,9 @@ gnc_gnome_help (const char *file_name, const char *anchor)
uri = g_strconcat ("ghelp:", file_name, NULL);
DEBUG ("Attempting to opening help uri %s", uri);
if (gtk_show_uri (NULL, uri, gtk_get_current_event_time (), &error))
success = gtk_show_uri (NULL, uri, gtk_get_current_event_time (), &error);
g_free (uri);
if (success)
return;
g_assert(error != NULL);