diff options
author | sthen <> | 2015-03-21 15:35:15 +0000 |
---|---|---|
committer | sthen <> | 2015-03-21 15:35:15 +0000 |
commit | 0d9aa4e26f586e474c2faf71df03853e8d3a53c8 (patch) | |
tree | 68de0621852b1e0d87bbbf6dd0f17487c11df838 /src/lib | |
parent | 2898b0c3a5e1e7f791f70cf4578bb2486c0612fa (diff) | |
download | openbsd-0d9aa4e26f586e474c2faf71df03853e8d3a53c8.tar.gz openbsd-0d9aa4e26f586e474c2faf71df03853e8d3a53c8.tar.bz2 openbsd-0d9aa4e26f586e474c2faf71df03853e8d3a53c8.zip |
free the server certificate in tls_connect_fds(); fixes a memory leak with
repeated use of tls_connect. ok jsing
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/libtls/tls_client.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/libtls/tls_client.c b/src/lib/libtls/tls_client.c index 682153ca65..2414034651 100644 --- a/src/lib/libtls/tls_client.c +++ b/src/lib/libtls/tls_client.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: tls_client.c,v 1.15 2015/02/11 07:01:10 jsing Exp $ */ | 1 | /* $OpenBSD: tls_client.c,v 1.16 2015/03/21 15:35:15 sthen Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> |
4 | * | 4 | * |
@@ -267,6 +267,7 @@ tls_connect_fds(struct tls *ctx, int fd_read, int fd_write, | |||
267 | " server certificate", servername); | 267 | " server certificate", servername); |
268 | goto err; | 268 | goto err; |
269 | } | 269 | } |
270 | X509_free(cert); | ||
270 | } | 271 | } |
271 | 272 | ||
272 | return (0); | 273 | return (0); |