From c56ae04274fda26269c6d06be34cf59a45eb70ce Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 7 Mar 2006 23:14:14 +0000 Subject: [PATCH] fixed a big memory leak in DoDrawBitmap() (coverity checker CID 57) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37876 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/generic/dcpsg.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/generic/dcpsg.cpp b/src/generic/dcpsg.cpp index ed99c1cf25..d9c6a9800a 100644 --- a/src/generic/dcpsg.cpp +++ b/src/generic/dcpsg.cpp @@ -872,8 +872,8 @@ void wxPostScriptDC::DoDrawBitmap( const wxBitmap& bitmap, wxCoord x, wxCoord y, unsigned char* data = image.GetData(); - /* buffer = line = width*rgb(3)*hexa(2)+'\n'(1)+null(1) */ - char* buffer = new char[ w*6+2 ]; + // size of the buffer = width*rgb(3)*hexa(2)+'\n' + wxCharBuffer buffer(w*6 + 1); int firstDigit, secondDigit; //rows -- 2.45.2