Skip to content

Commit 0395987

Browse files
authored
[GEN][ZH] Fix memory leak in SortingRendererClass::Insert_To_Sorting_Pool() (#844)
1 parent 1b1682d commit 0395987

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

Generals/Code/Libraries/Source/WWVegas/WW3D2/sortingrenderer.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -442,6 +442,7 @@ void SortingRendererClass::Insert_To_Sorting_Pool(SortingNodeStruct* state)
442442
{
443443
if (overlapping_node_count>=MAX_OVERLAPPING_NODES) {
444444
Release_Refs(state);
445+
delete state;
445446
WWASSERT(0);
446447
return;
447448
}

GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/sortingrenderer.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,7 @@ void SortingRendererClass::Insert_To_Sorting_Pool(SortingNodeStruct* state)
344344
{
345345
if (overlapping_node_count>=MAX_OVERLAPPING_NODES) {
346346
Release_Refs(state);
347+
delete state;
347348
WWASSERT(0);
348349
return;
349350
}

0 commit comments

Comments
 (0)