plugged a memleak

--Sven
This commit is contained in:
Sven Neumann 2000-02-24 01:21:04 +00:00
parent 40779fe370
commit a9df0647fc
2 changed files with 9 additions and 1 deletions

View File

@ -1,3 +1,8 @@
Thu Feb 24 02:20:15 CET 2000 Sven Neumann <sven@gimp.org>
* app/gimprc.c: gimp_parasite_attach() creates a copy of
the parasite, so free it here after attaching it
Thu Feb 24 00:42:12 CET 2000 Sven Neumann <sven@gimp.org>
* app/text_tool.c: don't crash if a font couldn't be loaded.

View File

@ -2407,6 +2407,7 @@ parse_parasite (gpointer val1p,
int res = ERROR;
gchar *identifier = NULL;
gulong flags = 0;
Parasite *parasite;
token = get_next_token ();
if (token != TOKEN_STRING)
@ -2424,7 +2425,9 @@ parse_parasite (gpointer val1p,
if (token != TOKEN_STRING)
goto error;
gimp_parasite_attach (parasite_new (identifier, flags, token_int, token_str));
parasite = parasite_new (identifier, flags, token_int, token_str);
gimp_parasite_attach (parasite); /* attaches a copy */
parasite_free (parasite);
token = get_next_token ();
if (token != TOKEN_RIGHT_PAREN)