We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
If more than default error handler is added to a SUNContext, it does not get free'd in SUNContext_Free.
SUNContext
SUNContext_Free
sundials/src/sundials/sundials_context.c
Line 288 in 2abd63b
sundials/src/sundials/sundials_errors.c
Lines 42 to 47 in 2abd63b
Either SUNContext_Free or SUNErrHandler_Destroy should traverse the list of error handlers through sunctx->err_handler->previous to free each.
SUNErrHandler_Destroy
sunctx->err_handler->previous
The text was updated successfully, but these errors were encountered:
sundials/src/sundials/sundials_context.c Line 288 in 2abd63b SUNErrHandler_Destroy(&(*sunctx)->err_handler);
This call to SUNErrHandler_Destory should be replaced with SUNContext_ClearErrHandlers
SUNErrHandler_Destory
SUNContext_ClearErrHandlers
Sorry, something went wrong.
Ah great, there's already a function to do that. I swapped in SUNContext_ClearErrHandlers and valgrind reports no leaks. I'll turn it into a PR.
Fix error handler memory leak. Fixes #466
b37f2ac
Closed by #467
Successfully merging a pull request may close this issue.
If more than default error handler is added to a
SUNContext
, it does not get free'd inSUNContext_Free
.sundials/src/sundials/sundials_context.c
Line 288 in 2abd63b
sundials/src/sundials/sundials_errors.c
Lines 42 to 47 in 2abd63b
Either
SUNContext_Free
orSUNErrHandler_Destroy
should traverse the list of error handlers throughsunctx->err_handler->previous
to free each.The text was updated successfully, but these errors were encountered: