Content-Length: 269088 | pFad | http://github.com/postgrespro/postgres/commit/61a65c53bd3e48e7ff7661a528d1791dfd956957

98 Fix memory leak in xlogreader facility. · postgrespro/postgres@61a65c5 · GitHub
Skip to content

Commit 61a65c5

Browse files
committed
Fix memory leak in xlogreader facility.
XLogReaderFree failed to free the per-block data buffers, when they happened to not be used by the latest read WAL record. Michael Paquier. Backpatch to 9.5, where the per-block buffers were added.
1 parent 3344451 commit 61a65c5

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/backend/access/transam/xlogreader.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -126,11 +126,8 @@ XLogReaderFree(XLogReaderState *state)
126126

127127
for (block_id = 0; block_id <= state->max_block_id; block_id++)
128128
{
129-
if (state->blocks[block_id].in_use)
130-
{
131-
if (state->blocks[block_id].data)
132-
pfree(state->blocks[block_id].data);
133-
}
129+
if (state->blocks[block_id].data)
130+
pfree(state->blocks[block_id].data);
134131
}
135132
if (state->main_data)
136133
pfree(state->main_data);

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/61a65c53bd3e48e7ff7661a528d1791dfd956957

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy