Issue #1974: Memory leak in gimpimage.c.2912fe7c1765dfc8d2e3f4858dc03ef4178e1c70
commit2912fe7c1765dfc8d2e3f4858dc03ef4178e1c70
authorJehan <jehan@girinstud.io>
Sat, 4 Aug 2018 10:54:07 +0000 (4 12:54 +0200)
committerJehan <jehan@girinstud.io>
Sat, 4 Aug 2018 10:57:03 +0000 (4 12:57 +0200)
treef7b670cc9702185f8a37c65b074a1beb71d170e1
parent0ab682b0f5bd2ddf8e6a8f8915967a60fb99a4f9
Issue #1974: Memory leak in gimpimage.c.

Ok my previous fix was wrong (at least for the part in the macro). This
is a macro, not a function. So each time we write _reason, the call to
g_strdup_printf() is reevaluated, hence data is allocated.
The right fix is to prepend `tmp` to the list, not `_reason`.
Thanks to Massimo for the debugging, as always!
app/core/gimpimage.c