1 Author: TomaszN <nowak2000@poczta.onet.pl> vim:ft=diff:
2 Description: fix memory leak issue, BTS #590942
5 ===================================================================
8 @@ -141,6 +141,8 @@ ExtFunc void GetTermcapInfo(void)
9 * Allocate it on the heap too.
11 data = buf = malloc(bufSize);
13 + fatal("memory allocation error");
16 * There is no standard include file for tgetstr, no prototype
17 @@ -154,9 +156,6 @@ ExtFunc void GetTermcapInfo(void)
18 /* Okay, so I'm paranoid; I just don't like unsafe routines */
19 if (data > buf + bufSize)
20 fatal("tgetstr overflow, you must have a very sick termcap");
22 - /* Trim off the unused portion of buffer */
23 - buf = realloc(buf, data - buf);