Skip to content

Commit

Permalink
mbedtls: fix issue about memory leak
Browse files Browse the repository at this point in the history
  • Loading branch information
lucas-law authored and lws-team committed Nov 8, 2024
1 parent 626f881 commit 6328231
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/plat/unix/unix-init.c
Original file line number Diff line number Diff line change
Expand Up @@ -262,4 +262,9 @@ lws_plat_context_late_destroy(struct lws_context *context)
lwsl_err("ZERO RANDOM FD\n");
if (context->fd_random != LWS_INVALID_FILE)
close(context->fd_random);

#if defined(LWS_WITH_MBEDTLS)
mbedtls_entropy_free(&context->mec);
mbedtls_ctr_drbg_free(&context->mcdc);
#endif
}

0 comments on commit 6328231

Please sign in to comment.