summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Lillqvist <tml@novell.com>2005-11-04 00:37:31 +0000
committerTor Lillqvist <tml@src.gnome.org>2005-11-04 00:37:31 +0000
commit36e1f67ac251d70fa90981aa58bb3808091bac1c (patch)
tree667014d1b1c6f20dca089dc51224735d6528e914
parent3f49474ebc74954fb138fde9075a9531791179fd (diff)
downloadgtk+-36e1f67ac251d70fa90981aa58bb3808091bac1c.tar.gz
Plug memory leak on Win32.
2005-11-04 Tor Lillqvist <tml@novell.com> * gtk/gtkstatusicon.c (gtk_status_icon_set_tooltip): Plug memory leak on Win32.
-rw-r--r--ChangeLog5
-rw-r--r--ChangeLog.pre-2-105
-rwxr-xr-xgtk/gtkstatusicon.c2
3 files changed, 12 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index e6c79bfe1d..ecad919859 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2005-11-04 Tor Lillqvist <tml@novell.com>
+
+ * gtk/gtkstatusicon.c (gtk_status_icon_set_tooltip): Plug memory
+ leak on Win32.
+
2005-11-03 Tor Lillqvist <tml@novell.com>
* gdk/win32/gdkcursor-win32.c: As there is only one GdkDisplay in
diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10
index e6c79bfe1d..ecad919859 100644
--- a/ChangeLog.pre-2-10
+++ b/ChangeLog.pre-2-10
@@ -1,3 +1,8 @@
+2005-11-04 Tor Lillqvist <tml@novell.com>
+
+ * gtk/gtkstatusicon.c (gtk_status_icon_set_tooltip): Plug memory
+ leak on Win32.
+
2005-11-03 Tor Lillqvist <tml@novell.com>
* gdk/win32/gdkcursor-win32.c: As there is only one GdkDisplay in
diff --git a/gtk/gtkstatusicon.c b/gtk/gtkstatusicon.c
index a745a255cd..18a504e138 100755
--- a/gtk/gtkstatusicon.c
+++ b/gtk/gtkstatusicon.c
@@ -1273,10 +1273,12 @@ gtk_status_icon_set_tooltip (GtkStatusIcon *status_icon,
else
{
WCHAR *wcs = g_utf8_to_utf16 (tooltip_text, -1, NULL, NULL, NULL);
+
status_icon->priv->nid.uFlags |= NIF_TIP;
wcsncpy (status_icon->priv->nid.szTip, wcs,
G_N_ELEMENTS (status_icon->priv->nid.szTip) - 1);
status_icon->priv->nid.szTip[G_N_ELEMENTS (status_icon->priv->nid.szTip) - 1] = 0;
+ g_free (wcs);
}
if (status_icon->priv->nid.hWnd != NULL && status_icon->priv->visible)
if (!Shell_NotifyIconW (NIM_MODIFY, &status_icon->priv->nid))