[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] r13433: Fix a new segfault when poisoning a non-present socks reques (in tor/trunk: . src/or)
Author: nickm
Date: 2008-02-08 18:09:26 -0500 (Fri, 08 Feb 2008)
New Revision: 13433
Modified:
tor/trunk/
tor/trunk/src/or/connection.c
Log:
r17989@catbus: nickm | 2008-02-08 18:09:23 -0500
Fix a new segfault when poisoning a non-present socks request.
Property changes on: tor/trunk
___________________________________________________________________
svk:merge ticket from /tor/trunk [r17989] on 8246c3cf-6607-4228-993b-4d95d33730f1
Modified: tor/trunk/src/or/connection.c
===================================================================
--- tor/trunk/src/or/connection.c 2008-02-08 22:01:59 UTC (rev 13432)
+++ tor/trunk/src/or/connection.c 2008-02-08 23:09:26 UTC (rev 13433)
@@ -337,8 +337,10 @@
if (CONN_IS_EDGE(conn)) {
edge_connection_t *edge_conn = TO_EDGE_CONN(conn);
tor_free(edge_conn->chosen_exit_name);
- memset(edge_conn->socks_request, 0xcc, sizeof(socks_request_t));
- tor_free(edge_conn->socks_request);
+ if (edge_conn->socks_request) {
+ memset(edge_conn->socks_request, 0xcc, sizeof(socks_request_t));
+ tor_free(edge_conn->socks_request);
+ }
}
if (conn->type == CONN_TYPE_CONTROL) {
control_connection_t *control_conn = TO_CONTROL_CONN(conn);