Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWill Rogers2020-09-07 08:34:21 +0000
committerLars Vogel2020-09-07 09:15:34 +0000
commitebb925eae87ac505b3c3243c72a3150ceb2e6f84 (patch)
treef2e249504ac911d9f55c36c5921a707c353b0674
parenteb2597355105f93a1b7f3cf8fa4525ee7d841ed6 (diff)
downloadrt.equinox.framework-ebb925eae87ac505b3c3243c72a3150ceb2e6f84.tar.gz
rt.equinox.framework-ebb925eae87ac505b3c3243c72a3150ceb2e6f84.tar.xz
rt.equinox.framework-ebb925eae87ac505b3c3243c72a3150ceb2e6f84.zip
Bug 566133 - Fix premature free() in native code.
-rw-r--r--features/org.eclipse.equinox.executable.feature/library/gtk/eclipseGtk.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/features/org.eclipse.equinox.executable.feature/library/gtk/eclipseGtk.c b/features/org.eclipse.equinox.executable.feature/library/gtk/eclipseGtk.c
index 488d18c62..b9856e1b0 100644
--- a/features/org.eclipse.equinox.executable.feature/library/gtk/eclipseGtk.c
+++ b/features/org.eclipse.equinox.executable.feature/library/gtk/eclipseGtk.c
@@ -119,15 +119,16 @@ gboolean gdbus_initProxy () {
GError *error = NULL; // Some functions return errors through params
gdbus_proxy = gtk.g_dbus_proxy_new_for_bus_sync(G_BUS_TYPE_SESSION, G_DBUS_PROXY_FLAGS_NONE, NULL, serviceName, GDBUS_OBJECT, GDBUS_INTERFACE, NULL, &error);
- free(serviceName);
if ((gdbus_proxy == NULL) || (error != NULL)) {
fprintf(stderr, "Launcher error: GDBus proxy init failed to connect %s:%s on %s.\n", serviceName, GDBUS_OBJECT, GDBUS_INTERFACE);
if (error != NULL) {
_ftprintf(stderr, "Launcher error: GDBus gdbus_proxy init failed for reason: %s\n", error->message);
gtk.g_error_free (error);
}
+ free(serviceName);
return 0;
} else {
+ free(serviceName);
return 1;
}
}

Back to the top