[gnutls-devel] GnuTLS | tests/hex.c: Add gnutls_free() to avoid memory leak (!1967)

Read-only notification of GnuTLS library development activities gnutls-devel at lists.gnutls.org
Sat May 31 01:25:47 CEST 2025




Daiki Ueno started a new discussion on tests/hex.c: https://gitlab.com/gnutls/gnutls/-/merge_requests/1967#note_2535577865

 >  	if (strlen(expected) != out.size) {
 >  		fail("%s: gnutls_hex_encode2: output has incorrect size (%d, expected %d)\n",
 >  		     test_name, (int)out.size, (int)strlen(expected));
 > +		gnutls_free(out.data);
 >  		exit(1);

Not a fault of this MR, but we don't need to manually call `exit`, as `fail` will do that.

-- 
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/-/merge_requests/1967#note_2535577865
You're receiving this email because of your account on gitlab.com.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gnupg.org/pipermail/gnutls-devel/attachments/20250530/e28a07cb/attachment.html>


More information about the Gnutls-devel mailing list