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 sixel_encoder_encode_bytes. #61

Open
muetzenmann opened this issue Apr 5, 2022 · 1 comment
Open

Memory leak in sixel_encoder_encode_bytes. #61

muetzenmann opened this issue Apr 5, 2022 · 1 comment

Comments

@muetzenmann
Copy link

By using valgrind, I found a memory leak in sixel_encoder_encode_bytes.

frame is allocated via sixel_frame_new, but never free'd.

To fix it, you can change line 1750 to

sixel_frame_t *frame = NULL;

and add

sixel_frame_unref(frame);

before the return statement.

@muetzenmann
Copy link
Author

Just found out, that the above change fixes the memory leak, when running with valgrind.
But, without valgrind, I get a segmentation fault.

Therefore, I don't think, you should apply my change. At least test it thoroughly.

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