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 identified in myersCalcEditDistanceSemiGlobal #193

Open
GDCCP opened this issue Oct 18, 2021 · 0 comments
Open

memory leak identified in myersCalcEditDistanceSemiGlobal #193

GDCCP opened this issue Oct 18, 2021 · 0 comments
Labels

Comments

@GDCCP
Copy link

GDCCP commented Oct 18, 2021

Description

static int myersCalcEditDistanceSemiGlobal(
        const Word* const Peq, const int W, const int maxNumBlocks,
        const int queryLength,
        const unsigned char* const target, const int targetLength,
        int k, const EdlibAlignMode mode,
        int* const bestScore_, int** const positions_, int* const numPositions_) {
    *positions_ = NULL;
    *numPositions_ = 0;

The statement *positinos_ = NULL; can lead to memory leak as *positions_ before the assignment is not released.

This is discovered during code inspection when working on #84

@GDCCP GDCCP added the bug label Oct 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant