patch: fix potential memory leak in tls_tcp by calling BIO_free()

This commit is contained in:
Alfred E. Heggestad 2011-10-04 20:33:48 +00:00
parent 1123872f12
commit 49d8f72384

View file

@ -248,6 +248,7 @@ int tls_start_tcp(struct tls_conn **ptc, struct tls *tls, struct tcp_conn *tcp)
tc->sbio_out = BIO_new_socket(tcp_conn_fd(tcp), BIO_NOCLOSE);
if (!tc->sbio_out) {
DEBUG_WARNING("alloc: BIO_new_socket() failed\n");
BIO_free(tc->sbio_in);
goto out;
}