Skip to content

Fix segfault when calling yaconv more than once#1

Open
jaopaulolc wants to merge 1 commit into
ivan23kor:yaconvfrom
jaopaulolc:yaconv
Open

Fix segfault when calling yaconv more than once#1
jaopaulolc wants to merge 1 commit into
ivan23kor:yaconvfrom
jaopaulolc:yaconv

Conversation

@jaopaulolc

@jaopaulolc jaopaulolc commented Sep 17, 2024

Copy link
Copy Markdown
Collaborator

yaconv_init_once relies on checking if filter_buf is null to detect if it is allocated. The problem is that calling free on filter_buf does not set said pointer to null. This commit fixes this by setting said pointer to null upon deinit.

This commit also frees auxinfo to avoid a memory leak.

Bug was identified by @caio96

yaconv_init_once relies on checking if filter_buf is null to detect if it is
allocated. The problem is that calling free on filter_buf does not set said
pointer to null. This commit fixes this by setting said pointer to null upon deinit.

This commit also frees auxinfo to avoid a memory leak.
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

Successfully merging this pull request may close these issues.

1 participant