Skip to content

Commit

Permalink
Fix memory leak in G3D::Array
Browse files Browse the repository at this point in the history
Bug introduced in 2fa08e3
  • Loading branch information
insunaa authored and cyberium committed Sep 28, 2023
1 parent a997cda commit 5c4aa5f
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 5c4aa5f

Please sign in to comment.