commit 2fa04e74fe304db479e3fb4c984c0868c725ab3c
Author:     Maarten van Gompel <[email protected]>
AuthorDate: Mon Mar 15 23:30:15 2021 +0100
Commit:     Hiltjo Posthuma <[email protected]>
CommitDate: Sun Mar 28 14:35:01 2021 +0200

    fixed double free error

diff --git a/Makefile b/Makefile
index 82057d3..7890619 100644
--- a/Makefile
+++ b/Makefile
@@ -27,12 +27,12 @@ config.h:
 svkbd.o: config.h layout.${LAYOUT}.h
 
 .c.o:
-       ${CC} ${SVKBD_CFLAGS} ${SVKBD_CPPFLAGS} -c $<
+       ${CC} -g ${SVKBD_CFLAGS} ${SVKBD_CPPFLAGS} -c $<
 
 ${OBJ}: config.h config.mk
 
 ${BIN}: ${OBJ}
-       ${CC} -o ${BIN} ${OBJ} ${SVKBD_LDFLAGS}
+       ${CC} -g -o ${BIN} ${OBJ} ${SVKBD_LDFLAGS}
 
 clean:
        rm -f ${NAME}-?? ${NAME}-??.o ${OBJ} ${BIN}
diff --git a/svkbd.c b/svkbd.c
index 35cbc61..2bc6d17 100644
--- a/svkbd.c
+++ b/svkbd.c
@@ -245,7 +245,6 @@ cleanup(void)
        drw_sync(drw);
        drw_free(drw);
        XSync(dpy, False);
-       drw_free(drw);
        XDestroyWindow(dpy, win);
        XSync(dpy, False);
        XSetInputFocus(dpy, PointerRoot, RevertToPointerRoot, CurrentTime);

Reply via email to