ui/gtk/icon.c

changeset 1160
881dfcf46cd6
parent 1016
ccde46662db7
--- a/ui/gtk/icon.c	Tue Jun 02 19:48:15 2026 +0200
+++ b/ui/gtk/icon.c	Tue Jun 02 20:12:57 2026 +0200
@@ -123,6 +123,8 @@
     char *path = g_file_get_path(file);
     if(!path) {
         icon = ui_icon("application-x-generic", size);
+    } else {
+        g_free(path);
     }
 #else
     if(!icon) {
@@ -143,6 +145,7 @@
         GError *error = NULL;
         char *path = g_file_get_path(file);
         icon->pixbuf = gdk_pixbuf_new_from_file(path, &error);
+        g_free(path);
     }
     return icon->pixbuf;
 }

mercurial