projects
/
platform
/
upstream
/
pango.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7245e42
)
[pango-language] Fix small leak
author
Behdad Esfahbod
<behdad@behdad.org>
Mon, 2 Mar 2009 07:47:24 +0000
(11:17 +0330)
committer
Behdad Esfahbod
<behdad@behdad.org>
Mon, 2 Mar 2009 07:47:24 +0000
(11:17 +0330)
Reported by Tommi Rantala.
pango/pango-language.c
patch
|
blob
|
history
diff --git
a/pango/pango-language.c
b/pango/pango-language.c
index
cae27ef
..
bfde308
100644
(file)
--- a/
pango/pango-language.c
+++ b/
pango/pango-language.c
@@
-688,7
+688,7
@@
pango_language_includes_script (PangoLanguage *language,
static PangoLanguage **
parse_default_languages (void)
{
- char *p;
+ char *p
, *p_copy
;
gboolean done = FALSE;
GArray *langs;
@@
-700,7
+700,7
@@
parse_default_languages (void)
if (p == NULL)
return NULL;
- p = g_strdup (p);
+ p
_copy = p
= g_strdup (p);
langs = g_array_new (TRUE, FALSE, sizeof (PangoLanguage *));
@@
-727,6
+727,8
@@
parse_default_languages (void)
p = end + 1;
}
+ g_free (p_copy);
+
return (PangoLanguage **) g_array_free (langs, FALSE);
}