Skip to content

Memory leak when using mmd_critic_markup_accept() #172

Closed

Description

@alfons-schmid

While integrating MMD into an iOS project I noticed that a call to

mmd_critic_markup_accept(buffer);

causes a memory leak. I actually think that the issue lies in

token * mmd_critic_tokenize_string(...)

because trie * ac is conditionally released, which I think is incorrect. It can easily be fixed by changing

 if (m) {
     ....
    match_free(m);
    trie_free(ac);
}

to

if (m) {
     ....
    match_free(m);
}
trie_free(ac);

Thank you!
Alfons

Activity

  1. added a commit that references this issue on Dec 5, 2019
  2. fletcher commented on Dec 5, 2019

    @fletcher
    Owner

    Thanks for pointing this out!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions