Skip to content

memory leak in MakePathEnds1::visitPathEnd #323

@maliberty

Description

@maliberty

asan shows a leak in MakePathEnds1::visitPathEnd of

PathEnd *copy = path_end->copy();

This happens because you use:

  ends_[group] = copy;

When group occurs more than once the previous value is leaked. I put some debug code here that verifies this does occur in the else branch with that attached test case.

  if (ends_.find(group) != ends_.end()) {
    printf("BAD\n");
    exit(1);
  }

bug.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions