mirror of
				https://github.com/postgres/postgres.git
				synced 2025-11-03 09:13:20 +03:00 
			
		
		
		
	Another attempt at fixing memory leak in xlogreader.
max_block_id is also reset between reading records. Michael Paquier
This commit is contained in:
		@@ -124,7 +124,7 @@ XLogReaderFree(XLogReaderState *state)
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
	int			block_id;
 | 
						int			block_id;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	for (block_id = 0; block_id <= state->max_block_id; block_id++)
 | 
						for (block_id = 0; block_id <= XLR_MAX_BLOCK_ID; block_id++)
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
		if (state->blocks[block_id].data)
 | 
							if (state->blocks[block_id].data)
 | 
				
			||||||
			pfree(state->blocks[block_id].data);
 | 
								pfree(state->blocks[block_id].data);
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user