GnuTLS | _gnutls_alt_name_assign_virt_type: Fix memory leak (!2138)
"(Deprecated) Read-only notification of GnuTLS library development activities" <[email protected]>
| Newsgroups | gmane.comp.encryption.gpg.gnutls.devel |
|---|---|
| Message-ID | <[email protected]> |
Tim Rühsen created a merge request: https://gitlab.com/gnutls/gnutls/-/merge_requests/2138 Branches: rockdaboot/memleak-gnutls_alt_name_assign_virt_type to master Author: Tim Rühsen * _gnutls_alt_name_assign_virt_type: Fix memory leak Signed-off-by: Tim Rühsen <[email protected]> ## Short explanation `_gnutls_alt_name_assign_virt_type()` takes ownership of `othername_oid` in case of success. The callers free `othername_oid` in case of error. But this isn't true for cases where `type > GNUTLS_SAN_MAX` - `othername_oid` isn't consumed nor freed. This MR frees `othername_oid` in the success case and when `type > GNUTLS_SAN_MAX`. ## Checklist * [x] Commits have `Signed-off-by:` with name/author being identical to the commit author * [ ] Code modified for feature * [ ] Test suite updated with functionality tests * [ ] Test suite updated with negative tests * [ ] Documentation updated / NEWS entry present (for non-trivial changes) ## Reviewer's checklist: * [ ] Any issues marked for closing are addressed * [ ] There is a test suite reasonably covering new functionality or modifications * [ ] Function naming, parameters, return values, types, etc., are consistent and according to `CONTRIBUTION.md` * [ ] This feature/change has adequate documentation added * [ ] No obvious mistakes in the code -- Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/-/merge_requests/2138 You're receiving this email because of your account on gitlab.com. Unsubscribe from this thread: https://gitlab.com/-/namespace/17175643/sent_notifications/6-1fakpjlrv6y6haqg0qs5p0zfc-a84t7/unsubscribe | Manage all notifications: https://gitlab.com/-/profile/notifications | Help: https://gitlab.com/help _______________________________________________ Gnutls-devel mailing list [email protected] http://lists.gnupg.org/mailman/listinfo/gnutls-devel