Auto merge of #27428 - avr1254:master, r=jdm

Fixed usage of wrong delete

<!-- Please describe your changes on the following line: -->

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix # 27398

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because they edit existing code.

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
This commit is contained in:
bors-servo 2020-07-28 18:10:55 -04:00 committed by GitHub
commit c6a3dcb90d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -13,7 +13,7 @@ std::wstring format(const std::wstring &txt, Args... args) {
auto ptr = new wchar_t[size];
swprintf(ptr, size, txt.c_str(), args...);
auto wstr = std::wstring(ptr);
delete ptr;
delete[] ptr;
return wstr;
}