X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f61815af20ebb943000d36ea01489f6115e4061c..ccf0b1d76ce28c0880df6d5c4866aaa548e2e56f:/src/html/htmlfilter.cpp diff --git a/src/html/htmlfilter.cpp b/src/html/htmlfilter.cpp index 508824b431..37215c5170 100644 --- a/src/html/htmlfilter.cpp +++ b/src/html/htmlfilter.cpp @@ -140,11 +140,11 @@ wxString wxHtmlFilterHTML::ReadFile(const wxFSFile& file) const wxString doc; if (s == NULL) return wxEmptyString; - src = (char*) malloc(s -> GetSize() + 1); + src = new char[s -> GetSize() + 1]; src[s -> GetSize()] = 0; s -> Read(src, s -> GetSize()); doc = src; - free(src); + delete[] src; return doc; }