From: <hv...@us...> - 2013-02-25 10:14:17
|
Revision: 57699 http://sourceforge.net/p/firebird/code/57699 Author: hvlad Date: 2013-02-25 10:14:15 +0000 (Mon, 25 Feb 2013) Log Message: ----------- Ported fix for bug CORE-4051 : Memory leak when sorting big records Modified Paths: -------------- firebird/trunk/src/jrd/sort.cpp Modified: firebird/trunk/src/jrd/sort.cpp =================================================================== --- firebird/trunk/src/jrd/sort.cpp 2013-02-25 10:05:23 UTC (rev 57698) +++ firebird/trunk/src/jrd/sort.cpp 2013-02-25 10:14:15 UTC (rev 57699) @@ -1511,6 +1511,11 @@ } 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 @@ } 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; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |