Hi Hackers, While reading the code of pageinspect, I just found a memory leak in gist_page_items():
``` values[4] = CStringGetTextDatum(buf.data); nulls[4] = false; ``` where CStringGetTextDatum() has made a copy of buf.data and assigned to value[4], however buf.data is never free-ed. This leak is inside a per-tuple loop, thus it should be fixed. In the meantime, the other small issue was also found in the same function. An index is opened by index_open() but closed by index_close() and relation_close() in different places. I also fixed the problem by changing relation_close() to index_close(). Best regards, == Chao Li (Evan) --------------------- HighGo Software Co., Ltd. https://www.highgo.com/
v1-0001-Fix-memory-leak-in-gist_page_items.patch
Description: Binary data
