From 51fad246ffda20ad6bb1d0bfc18676c81acdcffe Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 30 Dec 2001 17:24:00 +0000 Subject: [PATCH] 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 --- src/common/docview.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/common/docview.cpp b/src/common/docview.cpp index 36ecc6a..7588bcd 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. -- 2.7.4