Skip to content

Error Handler Memory Leak #466

@Steven-Roberts

Description

@Steven-Roberts

If more than default error handler is added to a SUNContext, it does not get free'd in SUNContext_Free.

https://github.com/LLNL/sundials/blob/2abd63bd6cbc354fb4861bba8e98d0b95d65e24a/src/sundials/sundials_context.c#L288

https://github.com/LLNL/sundials/blob/2abd63bd6cbc354fb4861bba8e98d0b95d65e24a/src/sundials/sundials_errors.c#L42-L47

Either SUNContext_Free or SUNErrHandler_Destroy should traverse the list of error handlers through sunctx->err_handler->previous to free each.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions