diff --git a/configure.ac b/configure.ac index f0d555f04..6c0e32e92 100644 --- a/configure.ac +++ b/configure.ac @@ -748,25 +748,6 @@ else AC_MSG_RESULT(no) fi -# Check if del_curterm is broken - in that case we redefine -# del_curterm as a no-op, to avoid a double-free - -AC_MSG_CHECKING([If del_curterm is broken]) -case $target_os in - *bsd*) - AC_MSG_RESULT(yes) - AC_DEFINE( - [HAVE_BROKEN_DEL_CURTERM], - [1], - [del_curterm is broken, redefine it to a no-op to avoid a double-free bug] - ) - ;; - *) - AC_MSG_RESULT(no) - ;; -esac - - # Tell the world what we know AC_CONFIG_FILES([Makefile]) AC_OUTPUT diff --git a/fallback.h b/fallback.h index eba91be6c..7d3afa13b 100644 --- a/fallback.h +++ b/fallback.h @@ -348,15 +348,6 @@ size_t wcslcpy(wchar_t *dst, const wchar_t *src, size_t siz); #endif -/** - BSD del_curterm seems to do a double-free. We redefine it as a no-op -*/ -#ifdef HAVE_BROKEN_DEL_CURTERM -#define fish_del_curterm(X) OK -#else -#define fish_del_curterm(X) del_curterm(X) -#endif - #ifndef HAVE_LRAND48_R /** diff --git a/input.cpp b/input.cpp index 136c68c5f..8eeb44779 100644 --- a/input.cpp +++ b/input.cpp @@ -528,7 +528,7 @@ void input_destroy() input_common_destroy(); - if (fish_del_curterm(cur_term) == ERR) + if (del_curterm(cur_term) == ERR) { debug(0, _(L"Error while closing terminfo")); }