Subject: CVS commit: basesrc/lib/libterm
To: None <source-changes@netbsd.org>
From: Christos Zoulas <christos@netbsd.org>
List: source-changes
Date: 10/31/2001 23:52:17
Module Name: basesrc
Committed By: christos
Date: Wed Oct 31 21:52:17 UTC 2001
Modified Files:
basesrc/lib/libterm: termcap.c
Log Message:
PR/10266: t_getstr() leaks memory. This PR will stay in feedback
until the problem gets addressed properly. The following fix
is a stopgap measure to stop the leaking :-(
I fixed the t_getstr() memory leak problem, but that instantly
revealed a problem in t_agetstr() which is an extremely broken
interface. It realloc's memory, potentially moving the area where
it returned pointers into in previous calls. This function needs
to be removed and or changed. I added a horrible work-around for
now, but I will revisit the problem shortly. In the meantime nobody
should be using the t_agetstr() API, and I'll be fixing the rest
of the programs and or the API when I figure out the best solution...
This is t_agetstr() is used by:
games/hack/hack.termcap.c
games/larn/io.c
games/tetris/screen.c
lib/libterm/termcap.c
lib/libterm/termcap.h
libexec/getty/main.c
usr.bin/top/screen.c
usr.bin/ul/ul.c
To generate a diff of this commit:
cvs rdiff -r1.38 -r1.39 basesrc/lib/libterm/termcap.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.