Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • 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 44
    • Issues 44
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Analytics
    • Analytics
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
  • OpenWalnut
  • OpenWalnut CoreOpenWalnut Core
  • Issues
  • #246

Closed
Open
Opened May 23, 2012 by Sebastian Volke@volke
  • Report abuse
  • New issue
Report abuse New issue

-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)

To upload designs, you'll need to enable LFS. More information
Assignee
Assign to
OpenWalnut 1.3
Milestone
OpenWalnut 1.3
Assign milestone
Time tracking
None
Due date
None
1
Labels
Bug
Assign labels
  • View project labels
Reference: openwalnut/openwalnut#246