Skip to content

Commit

Permalink
Fix memory leak in itkAdapter
Browse files Browse the repository at this point in the history
  • Loading branch information
ooz committed Mar 8, 2012
1 parent b918f62 commit 68c1646
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/Adapter/itk/itkAdapter_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 68c1646

Please sign in to comment.