Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit61a65c5

Browse files
committed
Fix memory leak in xlogreader facility.
XLogReaderFree failed to free the per-block data buffers, when theyhappened to not be used by the latest read WAL record.Michael Paquier. Backpatch to 9.5, where the per-block buffers were added.
1 parent3344451 commit61a65c5

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)

[8]ページ先頭

©2009-2025 Movatter.jp