There seems to be a small memory leak in _nc_read_entry_source in
version 5.4 of ncurses.
In particular, _nc_read_entry_source calls _nc_parse_entry, which in
turn calls _nc_init_entry, but the memory allocated there doesn't
appear to get freed anywhere. enqueue() copies the structure, rather
than making a new reference to it.
I attach a patch which appears to fix the problem, but it's rather
ugly.
Steven Smith.