Skip to content

Commit 1b9d52d

Browse files
authored
Fix memory leak in Sass::Eval::operator()(Sass::String_Schema*) (#3060)
1 parent 16f76e2 commit 1b9d52d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/eval.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1286,7 +1286,8 @@ namespace Sass {
12861286
}
12871287
if (!s->is_interpolant()) {
12881288
if (s->length() > 1 && res == "") return SASS_MEMORY_NEW(Null, s->pstate());
1289-
return SASS_MEMORY_NEW(String_Constant, s->pstate(), res, s->css());
1289+
String_Constant_Obj str = SASS_MEMORY_NEW(String_Constant, s->pstate(), res, s->css());
1290+
return str.detach();
12901291
}
12911292
// string schema seems to have a special unquoting behavior (also handles "nested" quotes)
12921293
String_Quoted_Obj str = SASS_MEMORY_NEW(String_Quoted, s->pstate(), res, 0, false, false, false, s->css());

0 commit comments

Comments
 (0)