Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Williams2018-05-14 11:18:14 -0400
committerEric Williams2018-05-14 11:23:08 -0400
commitf3f0297cd95fe6003053382ac6c73120eecac53a (patch)
treeba0302101dd23af68b7083c8b5af3efe53da8b95
parent52d6905fa13fe1fd24008b62655420ba524f8b47 (diff)
downloadeclipse.platform.swt-f3f0297cd95fe6003053382ac6c73120eecac53a.tar.gz
eclipse.platform.swt-f3f0297cd95fe6003053382ac6c73120eecac53a.tar.xz
eclipse.platform.swt-f3f0297cd95fe6003053382ac6c73120eecac53a.zip
Bug 534654: [GTK3] Free strings from native *to_string() functions
Add a g_free() call to free string from gdk_rgba_to_string(). Change-Id: Ie54850e2f8c1658f797bb6e3d4d3a78bb912f994 Signed-off-by: Eric Williams <ericwill@redhat.com>
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java1
1 files changed, 1 insertions, 0 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java
index 425c55f55c..40e502e8c3 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java
@@ -2386,6 +2386,7 @@ String gtk_rgba_to_css_string (GdkRGBA rgba) {
int length = C.strlen (str);
byte [] buffer = new byte [length];
C.memmove (buffer, str, length);
+ OS.g_free(str);
return new String (Converter.mbcsToWcs (buffer));
}

Back to the top