Spotted by GCC 15 analyzer:
./../includes/gnutls/gnutls.h:2321:24: warning: memory allocated with 'calloc' should be deallocated with 'gnutls_free' but was deallocated with 'gnutls_free'
2321 | #define gnutls_free(a) gnutls_free((void *)(a)), a = NULL
| ^~~~~~~~~~~~~~~~~~~~~~~~
rnd.c:166:9: note: in expansion of macro 'gnutls_free'
166 | gnutls_free(ctx);
| ^~~~~~~~~~~
Signed-off-by: Daiki Ueno <ueno@gnu.org>
uint8_t new_key[PRNG_KEY_SIZE * 2];
struct generators_ctx_st *ctx;
- ctx = calloc(1, sizeof(*ctx));
+ ctx = gnutls_calloc(1, sizeof(*ctx));
if (ctx == NULL)
return gnutls_assert_val(GNUTLS_E_MEMORY_ERROR);