Fixed memory leak in WriteFile.

git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@491 e3e1d417-86f3-4887-817a-d78f3d33393f
This commit is contained in:
stan 2003-04-15 14:14:56 +00:00
parent 7efec2d9ff
commit ff0dbc11b4
1 changed files with 3 additions and 3 deletions

View File

@ -100,9 +100,9 @@ void Image::WriteJpeg( const char *filename ) const
{ {
if ( ZM_COLOUR_JPEG_FILES && colours == 1 ) if ( ZM_COLOUR_JPEG_FILES && colours == 1 )
{ {
Image *temp_image = new Image( *this ); Image temp_image( *this );
temp_image->Colourise(); temp_image.Colourise();
temp_image->WriteJpeg( filename ); temp_image.WriteJpeg( filename );
return; return;
} }