From e00514993e8af862c017c78e5939a4dabd505431 Mon Sep 17 00:00:00 2001 From: Sven Neumann Date: Sat, 12 Apr 2003 12:59:15 +0000 Subject: [PATCH] applied a patch from Pedro Gimero that plugs a memleak in Script-Fu. 2003-04-12 Sven Neumann * plug-ins/script-fu/siod-wrapper.c (marshall_proc_db_call): applied a patch from Pedro Gimero that plugs a memleak in Script-Fu. --- ChangeLog | 5 +++++ plug-ins/script-fu/scheme-wrapper.c | 11 +++++++++++ plug-ins/script-fu/siod-wrapper.c | 11 +++++++++++ 3 files changed, 27 insertions(+) diff --git a/ChangeLog b/ChangeLog index c3487fff99..cdf0b6fca0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2003-04-12 Sven Neumann + + * plug-ins/script-fu/siod-wrapper.c (marshall_proc_db_call): + applied a patch from Pedro Gimero that plugs a memleak in Script-Fu. + 2003-04-11 Sven Neumann * app/display/gimpdisplayshell-scale.c diff --git a/plug-ins/script-fu/scheme-wrapper.c b/plug-ins/script-fu/scheme-wrapper.c index 35baf98420..74a37ec2a0 100644 --- a/plug-ins/script-fu/scheme-wrapper.c +++ b/plug-ins/script-fu/scheme-wrapper.c @@ -432,6 +432,17 @@ marshall_proc_db_call (LISP a) ¶ms, &return_vals)) return my_err ("Invalid procedure name specified.", NIL); + /* Free the name and the description which are of no use here. */ + for (i = 0; i < nparams; i++) + { + g_free (params[i].name); + g_free (params[i].description); + } + for (i = 0; i < nreturn_vals; i++) + { + g_free (return_vals[i].name); + g_free (return_vals[i].description); + } /* Check the supplied number of arguments */ if ((nlength (a) - 1) != nparams) diff --git a/plug-ins/script-fu/siod-wrapper.c b/plug-ins/script-fu/siod-wrapper.c index 35baf98420..74a37ec2a0 100644 --- a/plug-ins/script-fu/siod-wrapper.c +++ b/plug-ins/script-fu/siod-wrapper.c @@ -432,6 +432,17 @@ marshall_proc_db_call (LISP a) ¶ms, &return_vals)) return my_err ("Invalid procedure name specified.", NIL); + /* Free the name and the description which are of no use here. */ + for (i = 0; i < nparams; i++) + { + g_free (params[i].name); + g_free (params[i].description); + } + for (i = 0; i < nreturn_vals; i++) + { + g_free (return_vals[i].name); + g_free (return_vals[i].description); + } /* Check the supplied number of arguments */ if ((nlength (a) - 1) != nparams)