[gnutls-devel] GnuTLS | rnd: use matching allocator for gnutls_free (!2058)
Read-only notification of GnuTLS library development activities
gnutls-devel at lists.gnutls.org
Thu Jan 22 10:37:54 CET 2026
Daiki Ueno created a merge request: https://gitlab.com/gnutls/gnutls/-/merge_requests/2058
Project:Branches: dueno/gnutls:wip/dueno/gcc-analyzer-fixes to gnutls/gnutls:master
Author: Daiki Ueno
<!-- Add a description of the new feature/bug fix. Reference any relevant bugs. -->
* ocsp: suppress false-positive reported by GCC 15 analyzer
GCC 15 analyzer reports:
```
ocsp.c:2470:17: warning: dereference of NULL '*ocsps' [CWE-476] [-Wanalyzer-null-dereference]
2470 | gnutls_ocsp_resp_deinit((*ocsps)[i]);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
`*ocsps` should always be non-NULL when this part is exercised. This
adds an assertion for that.
* dane: use matching deallocator for gnutls_malloc
Spotted by GCC analyzer:
```
dane.c:972:17: warning: memory allocated with 'gnutls_malloc' should be deallocated with 'free' but was deallocated with 'free'
972 | free(new_cert_list);
| ^~~~~~~~~~~~~~~~~~~
```
* rnd: use matching allocator for gnutls_free
## 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/2058
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/20260122/5ea6deb9/attachment-0001.html>
More information about the Gnutls-devel
mailing list