[gimp] app: return of gimp_image_get_selected_drawables() must be freed.



commit 3603441037e5c284e7e0a2752ad72f986ecc4f66
Author: Jehan <jehan girinstud io>
Date:   Mon Aug 16 20:22:44 2021 +0200

    app: return of gimp_image_get_selected_drawables() must be freed.
    
    One more report by Massimo.

 app/display/gimpdisplayshell-dnd.c | 3 +++
 1 file changed, 3 insertions(+)
---
diff --git a/app/display/gimpdisplayshell-dnd.c b/app/display/gimpdisplayshell-dnd.c
index 4c274dfd6f..7949720423 100644
--- a/app/display/gimpdisplayshell-dnd.c
+++ b/app/display/gimpdisplayshell-dnd.c
@@ -364,6 +364,7 @@ gimp_display_shell_dnd_fill (GimpDisplayShell *shell,
           gimp_message_literal (shell->display->gimp, G_OBJECT (shell->display),
                                 GIMP_MESSAGE_ERROR,
                                 _("Cannot modify the pixels of layer groups."));
+          g_list_free (drawables);
           return;
         }
 
@@ -372,6 +373,7 @@ gimp_display_shell_dnd_fill (GimpDisplayShell *shell,
           gimp_message_literal (shell->display->gimp, G_OBJECT (shell->display),
                                 GIMP_MESSAGE_ERROR,
                                 _("A selected layer's pixels are locked."));
+          g_list_free (drawables);
           return;
         }
     }
@@ -400,6 +402,7 @@ gimp_display_shell_dnd_fill (GimpDisplayShell *shell,
         }
     }
 
+  g_list_free (drawables);
   gimp_image_undo_group_end (image);
   gimp_display_shell_dnd_flush (shell, image);
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]