Skip to content

Commit 565b0e1

Browse files
author
marcrasi
authored
change "new" to "malloc" because it gets "free"d later (swiftlang#29767)
1 parent 054d7b9 commit 565b0e1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/Sema/CSApply.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7564,7 +7564,8 @@ void Solution::setExprTypes(Expr *expr) const {
75647564

75657565
SolutionResult SolutionResult::forSolved(Solution &&solution) {
75667566
SolutionResult result(Kind::Success);
7567-
result.solutions = new Solution(std::move(solution));
7567+
void *memory = malloc(sizeof(Solution));
7568+
result.solutions = new (memory) Solution(std::move(solution));
75687569
result.numSolutions = 1;
75697570
return result;
75707571
}

0 commit comments

Comments
 (0)