summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRichard Hult <rhult@codefactory.se>2002-05-22 12:51:44 +0000
committerMikael Hallendal <hallski@src.gnome.org>2002-05-22 12:51:44 +0000
commit81952d3c2baf1def30a7554add2f3fb85821f083 (patch)
tree9aef9392ac8de50dc7331821e8c0833802dbb85a /src
parent2c3cece8508860b82fd96ae4ed14907fb2cd46db (diff)
downloadyelp-81952d3c2baf1def30a7554add2f3fb85821f083.tar.gz
free return from yelp_uri_to_string.
2002-05-22 Richard Hult <rhult@codefactory.se> * src/yelp-view-toc.c: (toc_man_emit): free return from yelp_uri_to_string. * src/yelp-util.c (yelp_util_compose_path_url): free path * src/yelp-man.c (yelp_man_init): free manpathes
Diffstat (limited to 'src')
-rw-r--r--src/yelp-man.c2
-rw-r--r--src/yelp-util.c7
-rw-r--r--src/yelp-view-toc.c5
3 files changed, 12 insertions, 2 deletions
diff --git a/src/yelp-man.c b/src/yelp-man.c
index 09371577..3e4b7a16 100644
--- a/src/yelp-man.c
+++ b/src/yelp-man.c
@@ -624,6 +624,8 @@ yelp_man_init (GNode *tree, GList **index)
g_hash_table_destroy (section_hash);
*index = g_list_concat (*index, man_index);
+
+ g_strfreev (manpathes);
return TRUE;
}
diff --git a/src/yelp-util.c b/src/yelp-util.c
index 6a92adba..82533ac8 100644
--- a/src/yelp-util.c
+++ b/src/yelp-util.c
@@ -404,6 +404,7 @@ yelp_util_compose_path_url (GNode *node,
const char *embedded_url)
{
char *path;
+ char *url;
path = yelp_util_node_to_string_path (node);
@@ -411,7 +412,11 @@ yelp_util_compose_path_url (GNode *node,
return NULL;
}
- return g_strconcat ("path:", path, ";", embedded_url, NULL);
+ url = g_strconcat ("path:", path, ";", embedded_url, NULL);
+
+ g_free (path);
+
+ return url;
}
diff --git a/src/yelp-view-toc.c b/src/yelp-view-toc.c
index 7030f1c9..f990a744 100644
--- a/src/yelp-view-toc.c
+++ b/src/yelp-view-toc.c
@@ -358,6 +358,7 @@ toc_man_emit (YelpViewTOC *view, GNode *first)
YelpSection *section;
gboolean got_a_leaf;
char *path, *url;
+ char *tmp;
int i;
gboolean sub_started = FALSE;
gchar *str_docs = _("Documents");
@@ -420,9 +421,11 @@ toc_man_emit (YelpViewTOC *view, GNode *first)
section = node->data;
url = yelp_util_compose_path_url (node->parent, yelp_uri_get_path (section->uri));
- yelp_html_printf (priv->html_view, "<td valign=\"Top\"><a href=\"%s\">%s</a></td>\n", yelp_uri_to_string (section->uri),
+ tmp = yelp_uri_to_string (section->uri);
+ yelp_html_printf (priv->html_view, "<td valign=\"Top\"><a href=\"%s\">%s</a></td>\n", tmp,
section->name);
g_free (url);
+ g_free (tmp);
i++;
}
} while ((node = node->next) != NULL);