Subject: Re: getch() memory leak fix
To: Julian Coleman <J.D.Coleman@newcastle.ac.uk>
From: None <itojun@iijlab.net>
List: tech-userlevel
Date: 08/01/2000 03:52:55
>> 	I found the following diff in my local tree.  it it still
>> 	necessary?
>Not sure if that it should be called a memory leak, as __init_getch() is
>only called once!

	... only if you call initscr() only once in your application.

>I don't see any reason to keep the return value around,
>so I think it can be free()'d, yes.  Some t_getstr() calls in setterm.c look
>like they could do with this too.  The one in getcap() should check against
>NULL not ERR, I think.

	i think we should free it.  i'll commit it and look into some other
	locations.

itojun