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:
parent
7efec2d9ff
commit
ff0dbc11b4
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue