Bug 1370526 - Fix new[]/delete mismatch. r=jrmuizel
authorKartikaya Gupta <kgupta@mozilla.com>
Tue, 06 Jun 2017 09:43:43 -0400
changeset 410642 8a8f6ea6d05652f93cff34147e3934c702a6bade
parent 410641 e1a83fc8ff4fdf2cfd16511363435102cf798d20
child 410643 98b04000fee7944862faa904f8c426fb64c91c21
push id7391
push usermtabara@mozilla.com
push dateMon, 12 Jun 2017 13:08:53 +0000
treeherdermozilla-beta@2191d7f87e2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjrmuizel
bugs1370526
milestone55.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1370526 - Fix new[]/delete mismatch. r=jrmuizel MozReview-Commit-ID: H7J8BK7regw
gfx/2d/ScaledFontMac.cpp
--- a/gfx/2d/ScaledFontMac.cpp
+++ b/gfx/2d/ScaledFontMac.cpp
@@ -202,17 +202,17 @@ int maxPow2LessThan(int a)
 struct writeBuf
 {
     explicit writeBuf(int size)
     {
         this->data = new unsigned char [size];
         this->offset = 0;
     }
     ~writeBuf() {
-        delete this->data;
+        delete[] this->data;
     }
 
     template <class T>
     void writeElement(T a)
     {
         *reinterpret_cast<T*>(&this->data[this->offset]) = a;
         this->offset += sizeof(T);
     }