Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Memory leak with the flevel chunking code #768

Open
DLPB2 opened this issue Dec 25, 2024 · 0 comments
Open

Memory leak with the flevel chunking code #768

DLPB2 opened this issue Dec 25, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@DLPB2
Copy link

DLPB2 commented Dec 25, 2024

Hi, when I use someone else's code, then it's only fair for me to help out if I spot a problem with it.

Your code has memory leak for function "int ff7_read_field_file"
Line 626 in file.cpp

Specifically, you allocate memory and then allow the possibility of a return without freeing memory.

uint32_t size = lgp_get_filesize(lgp_file, 1);
char* dest = (char*)driver_malloc(size);
char* original_field_data = (char*)driver_malloc(*ff7_externals.known_field_buffer_size);
if ( !ff7_externals.field_file_buffer ) return 0;

@DLPB2 DLPB2 added the bug Something isn't working label Dec 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant