diff options
author | Behdad Esfahbod <behdad@behdad.org> | 2009-03-02 11:17:24 +0330 |
---|---|---|
committer | Behdad Esfahbod <behdad@behdad.org> | 2009-03-02 11:17:24 +0330 |
commit | 1c9433bfe43890b102c8cead8ab3ee34b44c5c37 (patch) | |
tree | eb55f4b660f4922f751c6f01514a5db360c70ff3 /pango/pango-language.c | |
parent | 7245e427818d88358f2c9fcfdbe777701d7b0ab9 (diff) | |
download | pango-1c9433bfe43890b102c8cead8ab3ee34b44c5c37.tar.gz |
[pango-language] Fix small leak
Reported by Tommi Rantala.
Diffstat (limited to 'pango/pango-language.c')
-rw-r--r-- | pango/pango-language.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/pango/pango-language.c b/pango/pango-language.c index cae27eff..bfde3087 100644 --- 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); } |