On Wed, Jun 05, 2013 at 07:24:53PM +0200, Sven Joachim wrote: > No wonder that it segfaults, but why cur_term has these bogus values??? > you're the expert. :-)
partly a blunder of course: I was fixing warnings from Coverity advising of a memory leak. Here's a fix. diff -u -r1.156 ncurses/tinfo/lib_setup.c --- ncurses/tinfo/lib_setup.c 2013/05/25 20:20:08 1.156 +++ ncurses/tinfo/lib_setup.c 2013/06/06 01:01:18 @@ -48,7 +48,7 @@ #include <locale.h> #endif -MODULE_ID("$Id: lib_setup.c,v 1.156 2013/05/25 20:20:08 tom Exp $") +MODULE_ID("$Id: lib_setup.c,v 1.157 2013/06/06 01:01:18 tom Exp $") /**************************************************************************** * @@ -783,14 +783,12 @@ if ((VALID_STRING(cursor_address) || (VALID_STRING(cursor_down) && VALID_STRING(cursor_home))) && VALID_STRING(clear_screen)) { - free(termp); ret_error1(TGETENT_YES, "terminal is not really generic.\n", tname); } else { - free(termp); + del_curterm(termp); ret_error1(TGETENT_NO, "I need something more specific.\n", tname); } } else if (hard_copy) { - free(termp); ret_error1(TGETENT_YES, "I can't handle hardcopy terminals.\n", tname); } #endif -- Thomas E. Dickey <dic...@invisible-island.net> http://invisible-island.net ftp://invisible-island.net
signature.asc
Description: Digital signature