From ff0dbc11b43d10f899303e74418288cf800a6b6a Mon Sep 17 00:00:00 2001 From: stan Date: Tue, 15 Apr 2003 14:14:56 +0000 Subject: [PATCH] Fixed memory leak in WriteFile. git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@491 e3e1d417-86f3-4887-817a-d78f3d33393f --- src/zm_image.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/zm_image.cpp b/src/zm_image.cpp index c588581a1..6e5a63b34 100644 --- a/src/zm_image.cpp +++ b/src/zm_image.cpp @@ -100,9 +100,9 @@ void Image::WriteJpeg( const char *filename ) const { if ( ZM_COLOUR_JPEG_FILES && colours == 1 ) { - Image *temp_image = new Image( *this ); - temp_image->Colourise(); - temp_image->WriteJpeg( filename ); + Image temp_image( *this ); + temp_image.Colourise(); + temp_image.WriteJpeg( filename ); return; }