Skip to content

Commit

Permalink
Fix memory leak in G3D::Array
Browse files Browse the repository at this point in the history
  • Loading branch information
insunaa authored and cyberium committed Sep 28, 2023
1 parent c9dbe0f commit f507559
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions dep/g3dlite/System.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1334,11 +1334,12 @@ class BufferPool {
++medPoolSize;
return;
}
bytesAllocated -= USERSIZE_TO_REALSIZE(bytes);

// Free; the buffer pools are full or this is too big to store.
::free(USERPTR_TO_REALPTR(ptr));
}

bytesAllocated -= USERSIZE_TO_REALSIZE(bytes);

// Free; the buffer pools are full or this is too big to store.
::free(USERPTR_TO_REALPTR(ptr));
}
}

Expand Down

0 comments on commit f507559

Please sign in to comment.