Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libcurses PR/50092: don't leak screen on multiple setterms.
details: https://anonhg.NetBSD.org/src/rev/1ea53e0663a2
branches: trunk
changeset: 341817:1ea53e0663a2
user: christos <christos%NetBSD.org@localhost>
date: Tue Nov 24 01:59:32 2015 +0000
description:
PR/50092: don't leak screen on multiple setterms.
diffstat:
lib/libcurses/setterm.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diffs (27 lines):
diff -r c30952e1c524 -r 1ea53e0663a2 lib/libcurses/setterm.c
--- a/lib/libcurses/setterm.c Tue Nov 24 01:05:50 2015 +0000
+++ b/lib/libcurses/setterm.c Tue Nov 24 01:59:32 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: setterm.c,v 1.52 2013/10/16 19:59:29 roy Exp $ */
+/* $NetBSD: setterm.c,v 1.53 2015/11/24 01:59:32 christos Exp $ */
/*
* Copyright (c) 1981, 1993, 1994
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)setterm.c 8.8 (Berkeley) 10/25/94";
#else
-__RCSID("$NetBSD: setterm.c,v 1.52 2013/10/16 19:59:29 roy Exp $");
+__RCSID("$NetBSD: setterm.c,v 1.53 2015/11/24 01:59:32 christos Exp $");
#endif
#endif /* not lint */
@@ -69,6 +69,8 @@
if (type[0] == '\0')
type = "xx";
unknown = 0;
+ if (screen->term)
+ del_curterm(screen->term);
(void)ti_setupterm(&screen->term, type, fileno(screen->outfd), &r);
if (screen->term == NULL) {
unknown++;
Home |
Main Index |
Thread Index |
Old Index