JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
improved the memory leak prevention
authorarg@mig29 <unknown>
Wed, 6 Dec 2006 10:19:06 +0000 (11:19 +0100)
committerarg@mig29 <unknown>
Wed, 6 Dec 2006 10:19:06 +0000 (11:19 +0100)
main.c

diff --git a/main.c b/main.c
index 062f9d7..cde7e46 100644 (file)
--- 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;