From 03b5e90b0e4c254aca14896bb566bf45218f48d2 Mon Sep 17 00:00:00 2001 From: Robert Roebling Date: Thu, 19 Oct 2006 12:08:29 +0000 Subject: [PATCH] Fix mem leak. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42112 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/filefn.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/common/filefn.cpp b/src/common/filefn.cpp index 004dc02158..dd790a8431 100644 --- a/src/common/filefn.cpp +++ b/src/common/filefn.cpp @@ -1295,7 +1295,9 @@ wxChar *wxGetTempFileName(const wxString& prefix, wxChar *buf) bool wxGetTempFileName(const wxString& prefix, wxString& buf) { #if wxUSE_FILE - buf = wxGetTempFileName(prefix); + wxChar *cbuf = wxGetTempFileName(prefix); + buf = cbuf; + delete [] buf; return !buf.empty(); #else // !wxUSE_FILE