summaryrefslogtreecommitdiff
path: root/pango/pango-utils.c
diff options
context:
space:
mode:
author3 <alla@lysator.liu.se>2001-01-23 15:15:04 +0000
committerAlexander Larsson <alexl@src.gnome.org>2001-01-23 15:15:04 +0000
commitb2e1bc0147a5a91fd477ab23ab8a64be0bb94be4 (patch)
treeef2f6ccc206bfb82817b83428fd4f41592fc2b7f /pango/pango-utils.c
parentff7d31690c238cfdf8ed7d071cd34621a2dd7bb2 (diff)
downloadpango-b2e1bc0147a5a91fd477ab23ab8a64be0bb94be4.tar.gz
Free item->extra_attrs list.
2001-01-23 <alla@lysator.liu.se> * pango/pango-item.c (pango_item_free): Free item->extra_attrs list. * pango/pango-layout.c (process_item): Don't leak copy of item. * pango/pango-utils.c (read_config_file): If the config file open fails, don't leak the temp buffers.
Diffstat (limited to 'pango/pango-utils.c')
-rw-r--r--pango/pango-utils.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/pango/pango-utils.c b/pango/pango-utils.c
index d9958905..504986b6 100644
--- a/pango/pango-utils.c
+++ b/pango/pango-utils.c
@@ -429,9 +429,9 @@ read_config_file (const char *filename, gboolean enoent_error)
{
FILE *file;
- GString *line_buffer = g_string_new (NULL);
- GString *tmp_buffer1 = g_string_new (NULL);
- GString *tmp_buffer2 = g_string_new (NULL);
+ GString *line_buffer;
+ GString *tmp_buffer1;
+ GString *tmp_buffer2;
char *errstring = NULL;
const char *pos;
char *section = NULL;
@@ -446,6 +446,10 @@ read_config_file (const char *filename, gboolean enoent_error)
return;
}
+ line_buffer = g_string_new (NULL);
+ tmp_buffer1 = g_string_new (NULL);
+ tmp_buffer2 = g_string_new (NULL);
+
while (pango_read_line (file, line_buffer))
{
line++;