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 5508784 commit c6d06ec
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

1 comment on commit c6d06ec

@zw-su
Copy link

@zw-su zw-su commented on c6d06ec Dec 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't seem to have changed

Please sign in to comment.