[gnutls-devel] GnuTLS | _gnutls_alt_name_assign_virt_type: Fix memory leak (!2138)
(Deprecated) Read-only notification of GnuTLS library development activities
gnutls-devel at lists.gnutls.org
Wed Aug 19 10:14:44 CEST 2026
Tim Rühsen commented on a discussion on lib/x509/virt-san.c: https://gitlab.com/gnutls/gnutls/-/merge_requests/2138#note_3703852075
> name->type = GNUTLS_SAN_OTHERNAME;
>
> gnutls_free(san->data);
> + gnutls_free(othername_oid);
> Are you calling gnutls_free on a function argument declared as const char *othername_oid? That doesn't sound correct; I guess we should do that in the caller instead.
Yeah, it doesn't sound correct, but follows the logic of the existing `name->othername_oid.data = (uint8_t *)othername_oid;`. And it's a minimal change.
But I also agree with your patch. Going through it in details (+ applying) later today.
--
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/-/merge_requests/2138#note_3703852075
You're receiving this email because of your account on gitlab.com. Unsubscribe from this thread: https://gitlab.com/-/namespace/17175643/sent_notifications/6-5xks7z64sk378222unqwz2ph7-a84t7/unsubscribe | Manage all notifications: https://gitlab.com/-/profile/notifications | Help: https://gitlab.com/help
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gnupg.org/pipermail/gnutls-devel/attachments/20260819/0009e366/attachment-0003.html>
More information about the Gnutls-devel
mailing list