Issue #1974: Memory leak in gimpimage.c.
ADD_REASON macro was leaking the allocated string when version_reason return value was NULL (i.e. when we didn't care about the version reasons). Also we were not properly freeing all the reason strings at the end, only the list. Use g_list_free_full() instead of g_list_free().
Showing with 4 additions and 3 deletions