diff options
author | Tor Lillqvist <tml@novell.com> | 2005-11-04 00:37:31 +0000 |
---|---|---|
committer | Tor Lillqvist <tml@src.gnome.org> | 2005-11-04 00:37:31 +0000 |
commit | 36e1f67ac251d70fa90981aa58bb3808091bac1c (patch) | |
tree | 667014d1b1c6f20dca089dc51224735d6528e914 | |
parent | 3f49474ebc74954fb138fde9075a9531791179fd (diff) | |
download | gtk+-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-- | ChangeLog | 5 | ||||
-rw-r--r-- | ChangeLog.pre-2-10 | 5 | ||||
-rwxr-xr-x | gtk/gtkstatusicon.c | 2 |
3 files changed, 12 insertions, 0 deletions
@@ -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)) |