about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorarg@mig29 <unknown>2006-12-06 11:19:06 +0100
committerarg@mig29 <unknown>2006-12-06 11:19:06 +0100
commit6b345353e37e8af8eaa83956ef378015c0046eda (patch)
treea916f057b9c44e535fd71e62ed3df51134e2e327
parentab3b3a8f6195f1ab933c3e9e3fdd686ba1a6e3df (diff)
downloaddwm-6b345353e37e8af8eaa83956ef378015c0046eda.tar.gz
improved the memory leak prevention
-rw-r--r--main.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/main.c b/main.c
index 062f9d7..cde7e46 100644
--- a/main.c
+++ b/main.c
@@ -51,6 +51,9 @@ cleanup(void) {
 	XFreePixmap(dpy, dc.drawable);
 	XFreeGC(dpy, dc.gc);
 	XDestroyWindow(dpy, barwin);
+	XFreeCursor(dpy, cursor[CurNormal]);
+	XFreeCursor(dpy, cursor[CurResize]);
+	XFreeCursor(dpy, cursor[CurMove]);
 	XSetInputFocus(dpy, PointerRoot, RevertToPointerRoot, CurrentTime);
 	XSync(dpy, False);
 	free(seltag);
@@ -104,7 +107,7 @@ setup(void) {
 				numlockmask = (1 << i);
 		}
 	}
-	XFree(modmap);
+	XFreeModifiermap(modmap);
 	/* select for events */
 	wa.event_mask = SubstructureRedirectMask | SubstructureNotifyMask
 		| EnterWindowMask | LeaveWindowMask;
156' href='#n156'>156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177