Permalink
Browse files

Fix memory leak in itkAdapter

  • Loading branch information...
1 parent b918f62 commit 68c1646e5551ae460171cf8c66d41db58a0c4fae @ooz ooz committed Mar 8, 2012
Showing with 3 additions and 0 deletions.
  1. +3 −0 lib/Adapter/itk/itkAdapter_impl.hpp
@@ -221,6 +221,9 @@ typename TOutput::Pointer itkAdapter::internCreateItk( const bool behaveAsItkRea
rescaler->SetOutputMaximum( minMaxPair.second->as<typename InputImageType::PixelType>() );
rescaler->Update();
outputImage = rescaler->GetOutput();
+
+ free(targePtr);
+
return outputImage;
}

0 comments on commit 68c1646

Please sign in to comment.