[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] Try a little harder to avoid openssl SSL* double-free repor...
- To: or-cvs@xxxxxxxxxxxxx
- Subject: [or-cvs] Try a little harder to avoid openssl SSL* double-free repor...
- From: nickm@xxxxxxxx (Nick Mathewson)
- Date: Sun, 27 Feb 2005 21:52:54 -0500 (EST)
- Delivered-to: archiver@seul.org
- Delivered-to: or-cvs-outgoing@seul.org
- Delivered-to: or-cvs@seul.org
- Delivery-date: Sun, 27 Feb 2005 21:53:31 -0500
- Reply-to: or-dev@xxxxxxxxxxxxx
- Sender: owner-or-cvs@xxxxxxxxxxxxx
Update of /home/or/cvsroot/tor/src/common
In directory moria.mit.edu:/tmp/cvs-serv7198/src/common
Modified Files:
tortls.c
Log Message:
Try a little harder to avoid openssl SSL* double-free reports.
Index: tortls.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/common/tortls.c,v
retrieving revision 1.87
retrieving revision 1.88
diff -u -d -r1.87 -r1.88
--- tortls.c 28 Feb 2005 01:55:09 -0000 1.87
+++ tortls.c 28 Feb 2005 02:52:51 -0000 1.88
@@ -436,8 +436,10 @@
void
tor_tls_free(tor_tls *tls)
{
+ tor_assert(tls && tls->ssl);
SSL_free(tls->ssl);
- free(tls);
+ tls->ssl = NULL;
+ tor_free(tls);
}
/** Underlying function for TLS reading. Reads up to <b>len</b>