projects
/
project
/
ustream-ssl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
add9c19
)
polarssl: fix memory leak
author
Felix Fietkau
<nbd@openwrt.org>
Fri, 15 Jan 2016 23:04:12 +0000
(
00:04
+0100)
committer
Felix Fietkau
<nbd@openwrt.org>
Fri, 15 Jan 2016 23:04:12 +0000
(
00:04
+0100)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
ustream-polarssl.c
patch
|
blob
|
history
diff --git
a/ustream-polarssl.c
b/ustream-polarssl.c
index 9ddf931e5250bc920d277cb12a86c99d252aec65..9208e6a504cf771493a44849d1b3f852ee9a400c 100644
(file)
--- a/
ustream-polarssl.c
+++ b/
ustream-polarssl.c
@@
-140,6
+140,7
@@
__hidden int __ustream_ssl_set_key_file(struct ustream_ssl_ctx *ctx, const char
__hidden void __ustream_ssl_context_free(struct ustream_ssl_ctx *ctx)
{
pk_free(&ctx->key);
+ x509_crt_free(&ctx->ca_cert);
x509_crt_free(&ctx->cert);
free(ctx);
}
@@
-317,7
+318,7
@@
__hidden void *__ustream_ssl_session_new(struct ustream_ssl_ctx *ctx)
ssl_set_ca_chain(ssl, ctx->cert.next, NULL, NULL);
ssl_set_own_cert(ssl, &ctx->cert, &ctx->key);
} else {
- ssl_set_ca_chain(ssl, &ctx->cert, NULL, NULL);
+ ssl_set_ca_chain(ssl, &ctx->c
a_c
ert, NULL, NULL);
}
ssl_session_reset(ssl);