diff options
| author | Eric Fahlgren | 2025-11-10 21:18:04 +0000 |
|---|---|---|
| committer | Felix Fietkau | 2026-01-31 13:56:34 +0000 |
| commit | 931bbfeb2c92ecaa8ca2262b9bef27df8614ffb9 (patch) | |
| tree | f6f1379c11dd377ad6219e10d0d7beee15ad12b0 | |
| parent | 80c9bd29c2331f34e91ec47fd7b486f58613a224 (diff) | |
| download | uclient-931bbfeb2c92ecaa8ca2262b9bef27df8614ffb9.tar.gz | |
ucode: fix memory leak when using ssl context
Check for and free any SSL context when freeing uclient object.
Fixes: https://github.com/openwrt/uclient/issues/11
Signed-off-by: Eric Fahlgren <ericfahlgren@gmail.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
| -rw-r--r-- | ucode.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -55,6 +55,8 @@ static void free_uclient(void *ptr) return; ucl = cl->priv; + if (ucl->ssl_ctx) + ucl->ssl_ops->context_free(ucl->ssl_ctx); ucv_array_set(registry, ucl->idx, NULL); ucv_array_set(registry, ucl->idx + 1, NULL); uclient_free(cl); |