changeset 4218:fac89c0d55c2

[gaim-migrate @ 4462] Fix by deryni. committer: Tailor Script <tailor@pidgin.im>
author Sean Egan <seanegan@gmail.com>
date Tue, 07 Jan 2003 06:11:08 +0000
parents b69192ef14e9
children 1c57051bf64b
files plugins/notify.c
diffstat 1 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/notify.c	Tue Jan 07 03:53:11 2003 +0000
+++ b/plugins/notify.c	Tue Jan 07 06:11:08 2003 +0000
@@ -342,6 +342,7 @@
 	XWMHints *hints = XGetWMHints(GDK_WINDOW_XDISPLAY(c->window->window), GDK_WINDOW_XWINDOW(c->window->window));
 	hints->flags |= XUrgencyHint;
 	XSetWMHints(GDK_WINDOW_XDISPLAY(c->window->window), GDK_WINDOW_XWINDOW(c->window->window), hints);
+	XFree(hints);
 }
 
 gboolean urgent_remove(struct conversation *c) {
@@ -354,8 +355,10 @@
 			if (hints->flags & XUrgencyHint) {
 				hints->flags &= ~XUrgencyHint;
 				XSetWMHints(GDK_WINDOW_XDISPLAY(c->window->window), GDK_WINDOW_XWINDOW(c->window->window), hints);
+				XFree(hints);
 				return TRUE;
 			}
+			XFree(hints);
 			return FALSE;
 		} else {
 			struct conversation *c = (struct conversation *)conversations->data;
@@ -365,8 +368,10 @@
 			if (hints->flags & XUrgencyHint) {
 				hints->flags &= ~XUrgencyHint;
 				XSetWMHints(GDK_WINDOW_XDISPLAY(c->window->window), GDK_WINDOW_XWINDOW(c->window->window), hints);
+				XFree(hints);
 				return TRUE;
 			}
+			XFree(hints);
 			return FALSE;
 		}
 	} else {
@@ -374,8 +379,10 @@
 		if (hints->flags & XUrgencyHint) {
 			hints->flags &= ~XUrgencyHint;
 			XSetWMHints(GDK_WINDOW_XDISPLAY(c->window->window), GDK_WINDOW_XWINDOW(c->window->window), hints);
+			XFree(hints);
 			return TRUE;
 		}
+		XFree(hints);
 		return FALSE;
 	}
 }