mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 00:03:02 +01:00
Ported fix for bug CORE-4051 : Memory leak when sorting big records
This commit is contained in:
parent
91f3944eae
commit
2ec6aa1c4b
@ -1511,6 +1511,11 @@ void Sort::mergeRuns(USHORT n)
|
||||
}
|
||||
|
||||
run->run_buff_cache = false;
|
||||
if (run->run_buff_alloc)
|
||||
{
|
||||
delete[] run->run_buffer;
|
||||
run->run_buff_alloc = false;
|
||||
}
|
||||
run->run_buffer = NULL;
|
||||
|
||||
// Add run descriptor to list of unused run descriptor blocks
|
||||
@ -1520,11 +1525,7 @@ void Sort::mergeRuns(USHORT n)
|
||||
}
|
||||
|
||||
m_free_runs = run->run_next;
|
||||
if (run->run_buff_alloc)
|
||||
{
|
||||
delete[] run->run_buffer;
|
||||
run->run_buff_alloc = false;
|
||||
}
|
||||
|
||||
temp_run.run_header.rmh_type = RMH_TYPE_RUN;
|
||||
temp_run.run_depth = run->run_depth;
|
||||
temp_run.run_buff_cache = false;
|
||||
|
Loading…
Reference in New Issue
Block a user