From: Vadim Zeitlin Date: Sun, 30 Dec 2001 17:24:00 +0000 (+0000) Subject: fixed memory leak in wxDocManager::CreateDocument (patch 494842) X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/51fad246ffda20ad6bb1d0bfc18676c81acdcffe fixed memory leak in wxDocManager::CreateDocument (patch 494842) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13246 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/common/docview.cpp b/src/common/docview.cpp index 36ecc6a51a..7588bcdd81 100644 --- a/src/common/docview.cpp +++ b/src/common/docview.cpp @@ -1045,7 +1045,10 @@ wxDocument *wxDocManager::CreateDocument(const wxString& path, long flags) delete doc; } else + { + delete[] templates; return (wxDocument *) NULL; + } } // New document: user chooses a template, unless there's only one.