Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
OpenWalnut Core OpenWalnut Core
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 86
    • Issues 86
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Analytics
    • Analytics
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • OpenWalnut
  • OpenWalnut CoreOpenWalnut Core
  • Issues
  • #246

Closed
Open
Created May 23, 2012 by Sebastian Volke@volkeOwner

-RM-177-MR-NIfTI reader resource leak and exception slicing problem

Hi,

In the WReaderNIfTI::load, the header variable contains a nifti_image which isn't freed properly and thus leaked. Also, exceptions are handled like this: @catch( const std::exception& e ) { nifti_image_free( filedata ); throw e; }@

This causes the exception to be sliced if a subclass of std::exception is thrown.

The attached patch fixes both of these problems. The header variable isn't actually needed as far as I can see and the exception can be handled more easily by using a boost::shared_ptr.

(from redmine: created on 2012-05-23, closed on 2012-05-24)

Assignee
Assign to
OpenWalnut 1.3
Milestone
OpenWalnut 1.3
Assign milestone
Time tracking