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 in r_io_plugin_init #21705

Closed
Hripsimee opened this issue May 4, 2023 · 1 comment
Closed

Memory leak in r_io_plugin_init #21705

Hripsimee opened this issue May 4, 2023 · 1 comment

Comments

@Hripsimee
Copy link
Contributor

The r_io_plugin_init function in the libr/io/io_plugin.c source file appears to contain a memory leak. Specifically, memory is allocated using R_NEW0 macro in line 30:

static_plugin = R_NEW0 (RIOPlugin); // line 30

If r_io_plugin_add (io, static_plugin);(line 35) fails to add the allocated memory object to the io, the function will return false. In such a scenario, the allocated memory should be cleaned.

@trufae
Copy link
Collaborator

trufae commented May 4, 2023

Can you send a pullreq fixing the issue instead of explaining the issue? it's easier to review and you'll get credit

@trufae trufae added this to the 5.8.6 - codename: dithered milestone May 4, 2023
@trufae trufae closed this as completed in 16ca17b May 4, 2023
as0ler pushed a commit that referenced this issue May 30, 2023
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

2 participants