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 not freed #10

Open
nikolaospanagopoulos opened this issue Dec 7, 2022 · 0 comments
Open

memory not freed #10

nikolaospanagopoulos opened this issue Dec 7, 2022 · 0 comments

Comments

@nikolaospanagopoulos
Copy link

`

elf_file->elf_memory = kzalloc(stat.filesize);
res = fread(elf_file->elf_memory, stat.filesize, 1, fd);
if (res < 0)
{
    goto out;
}

res = elf_process_loaded(elf_file);
if(res < 0)
{
    goto out;
}

`

in elfloader.c file, in the elf_load function, we dont free the memory we allocated with kzalloc, if we fail to read the file or if we fail to load the file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant