summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsthen <>2015-03-21 15:35:15 +0000
committersthen <>2015-03-21 15:35:15 +0000
commit2335ea63067865cf75a664af53102a46ea52c629 (patch)
tree68de0621852b1e0d87bbbf6dd0f17487c11df838 /src
parent49c3a24c899173341c1bbdfe1fe50329dc016723 (diff)
downloadopenbsd-2335ea63067865cf75a664af53102a46ea52c629.tar.gz
openbsd-2335ea63067865cf75a664af53102a46ea52c629.tar.bz2
openbsd-2335ea63067865cf75a664af53102a46ea52c629.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')
-rw-r--r--src/lib/libtls/tls_client.c3
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);