-
-
Notifications
You must be signed in to change notification settings - Fork 10.9k
ts_conf: fix memory leak in TS_CONF_set_policies #28686
New issue
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
Conversation
3c6358f
to
b5b7f92
Compare
I’ve signed the CLA with this email (bleeqtheproducer@gmail.com). Please re-run the check. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CLAs are processed manually, so can take a little while.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you!
This pull request is ready to merge |
Reviewed-by: Paul Dale <ppzgs1@gmail.com> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from #28686)
Merged to all the active branches. Thank you for your contribution. |
TS_CONF_set_policies() allocated ASN1_OBJECTs via OBJ_txt2obj()
but did not free them after calling TS_RESP_CTX_add_policy().
Since TS_RESP_CTX_add_policy() duplicates the object internally,
the temporary ASN1_OBJECT must always be freed.
This patch ensures ASN1_OBJECT_free() is called on both success
and failure paths, preventing a per-policy memory leak.
Fixes #28628