Code

ncu: free the SCREEN on exit
authorMax Kellermann <max@duempel.org>
Fri, 14 Aug 2009 21:45:17 +0000 (23:45 +0200)
committerMax Kellermann <max@duempel.org>
Fri, 14 Aug 2009 21:45:17 +0000 (23:45 +0200)
Make valgrind happier.

src/ncu.c

index 2e90699905288a91e4fd5d713e78b795b2dcebc0..2b1721d6d171cb10d181c38460482e2d8a094873 100644 (file)
--- a/src/ncu.c
+++ b/src/ncu.c
 #include <ncurses.h>
 #endif
 
+static SCREEN *ncu_screen;
+
 void
 ncu_init(void)
 {
        /* initialize the curses library */
-       initscr();
+       ncu_screen = newterm(NULL, stdout, stdin);
 
        /* initialize color support */
 #ifdef ENABLE_COLORS
@@ -68,4 +70,6 @@ void
 ncu_deinit(void)
 {
        endwin();
+
+       delscreen(ncu_screen);
 }