Hi, Came across this when I was trying to figure out how to test the documentation. See patch for details.
Thanks, Yawar
From 1adf4e8959f50fc1469b72a261ad04d844a8cad9 Mon Sep 17 00:00:00 2001 From: Yawar Amin <yawar.a...@gmail.com> Date: Sat, 12 Jan 2013 18:09:25 -0500 Subject: [PATCH] gnc_gnome_help: Free allocated mem In the Linux version of the function, the string `uri' has memory allocated for it by the g_strconcat function. Should be freed. Signed-off-by: Yawar Amin <yawar.a...@gmail.com> --- src/gnome-utils/gnc-gnome-utils.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/gnome-utils/gnc-gnome-utils.c b/src/gnome-utils/gnc-gnome-utils.c index 7d89726..13d9efd 100644 --- a/src/gnome-utils/gnc-gnome-utils.c +++ b/src/gnome-utils/gnc-gnome-utils.c @@ -419,18 +419,18 @@ gnc_gnome_help (const char *file_name, const char *anchor) DEBUG ("Attempting to opening help uri %s", uri); - if (gtk_show_uri (NULL, uri, gtk_get_current_event_time (), &error)) - return; - - g_assert(error != NULL); - { - const gchar *message = - _("GnuCash could not find the files for the help documentation. " - "This is likely because the 'gnucash-docs' package is not installed."); - gnc_error_dialog(NULL, "%s", message); + if (!gtk_show_uri (NULL, uri, gtk_get_current_event_time (), &error)) { + g_assert(error != NULL); + { + const gchar *message = + _("GnuCash could not find the files for the help documentation. " + "This is likely because the 'gnucash-docs' package is not installed."); + gnc_error_dialog(NULL, "%s", message); + } + PERR ("%s", error->message); + g_error_free(error); } - PERR ("%s", error->message); - g_error_free(error); + g_free (uri); } -- 1.7.9.5
signature.asc
Description: OpenPGP digital signature
_______________________________________________ gnucash-devel mailing list gnucash-devel@gnucash.org https://lists.gnucash.org/mailman/listinfo/gnucash-devel