Skip to content

Commit

Permalink
Fix memory leak in resolve_parent_refs
Browse files Browse the repository at this point in the history
Fixes a memory leak introduced in
4254054.

I do not understand why it leaks without this change but it does seem
like a bug in `SharedPtr`.

Fixes #2746
  • Loading branch information
glebm authored and xzyfer committed Nov 20, 2018
1 parent f442421 commit 430315a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/ast.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1243,7 +1243,8 @@ namespace Sass {
if (!this->has_parent_ref()) return this;
Selector_List_Ptr ss = SASS_MEMORY_NEW(Selector_List, pstate());
for (size_t si = 0, sL = this->length(); si < sL; ++si) {
ss->concat(at(si)->resolve_parent_refs(pstack, traces, implicit_parent));
Selector_List_Obj rv = at(si)->resolve_parent_refs(pstack, traces, implicit_parent);
ss->concat(rv);
}
return ss;
}
Expand Down

0 comments on commit 430315a

Please sign in to comment.