[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [obfsproxy/master] Correctly check the return value of proto_conn_create().



commit f3726bdd5e782fc3c59645f096e337bb19b4608e
Author: George Kadianakis <desnacked@xxxxxxxxxx>
Date:   Mon Jan 16 16:15:44 2012 +0200

    Correctly check the return value of proto_conn_create().
---
 src/network.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/network.c b/src/network.c
index 86d46e7..3e15503 100644
--- a/src/network.c
+++ b/src/network.c
@@ -516,7 +516,7 @@ open_outbound(conn_t *conn, bufferevent_data_cb readcb)
   }
 
   newconn = proto_conn_create(conn->cfg);
-  if (!conn) {
+  if (!newconn) {
     log_warn("%s: failed to allocate state for outbound connection",
              conn->peername);
     bufferevent_free(buf);
@@ -570,7 +570,7 @@ open_outbound_hostname(conn_t *conn, int af, const char *addr, int port)
     return NULL;
   }
   newconn = proto_conn_create(conn->cfg);
-  if (!conn) {
+  if (!newconn) {
     log_warn("%s: failed to allocate state for outbound connection",
              conn->peername);
     bufferevent_free(buf);



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits