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>
+ 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);
ucv_array_set(registry, ucl->idx, NULL);
ucv_array_set(registry, ucl->idx + 1, NULL);
uclient_free(cl);