Skip to content
This repository was archived by the owner on Oct 24, 2025. It is now read-only.

Commit 430315a

Browse files
glebmxzyfer
authored andcommitted
Fix memory leak in resolve_parent_refs
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
1 parent f442421 commit 430315a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/ast.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1243,7 +1243,8 @@ namespace Sass {
12431243
if (!this->has_parent_ref()) return this;
12441244
Selector_List_Ptr ss = SASS_MEMORY_NEW(Selector_List, pstate());
12451245
for (size_t si = 0, sL = this->length(); si < sL; ++si) {
1246-
ss->concat(at(si)->resolve_parent_refs(pstack, traces, implicit_parent));
1246+
Selector_List_Obj rv = at(si)->resolve_parent_refs(pstack, traces, implicit_parent);
1247+
ss->concat(rv);
12471248
}
12481249
return ss;
12491250
}

0 commit comments

Comments
 (0)