Skip to content

Error Handler Memory Leak #466

Closed
@Steven-Roberts

Description

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

SUNErrHandler_Destroy(&(*sunctx)->err_handler);

void SUNErrHandler_Destroy(SUNErrHandler* eh)
{
if (!eh || !(*eh)) { return; }
free(*eh);
*eh = NULL;
}

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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