Bug 573472 - [GTK3] Program.getPrograms() leaks native memory

With this change, the result of g_app_info_get_all() is correctly freed
in Program.getPrograms(). This prevents a native memory leak.

Change-Id: I0e8a7f0be2baa4a763176e0e91c262adf38742d3
Signed-off-by: Simeon Andreev <simeon.danailov.andreev@gmail.com>
Reviewed-on: https://git.eclipse.org/r/c/platform/eclipse.platform.swt/+/180539
Tested-by: Andrey Loskutov <loskutov@gmx.de>
Reviewed-by: Andrey Loskutov <loskutov@gmx.de>
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Program/gtk/org/eclipse/swt/program/Program.java b/bundles/org.eclipse.swt/Eclipse SWT Program/gtk/org/eclipse/swt/program/Program.java
index 1bcba88..55a3ef5 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Program/gtk/org/eclipse/swt/program/Program.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Program/gtk/org/eclipse/swt/program/Program.java
@@ -306,7 +306,6 @@
 			}
 			OS.g_free(icon_name);
 		}
-		OS.g_object_unref(icon);
 	}
 	return program.command != null ? program : null;
 }
@@ -328,6 +327,7 @@
 				program = gio_getProgram(display, application);
 				if (program != null) programs.add(program);
 //			}
+				OS.g_object_unref(application);
 		}
 		list = OS.g_list_next(list);
 	}