Browse Source

tun2socks: fix possible crash due to the use of a wrong dead-variable

ambrop7 13 years ago
parent
commit
d551b48e32
1 changed files with 3 additions and 3 deletions
  1. 3 3
      tun2socks/tun2socks.c

+ 3 - 3
tun2socks/tun2socks.c

@@ -1564,10 +1564,10 @@ err_t client_sent_func (void *arg, struct tcp_pcb *tpcb, u16_t len)
             SYNC_DECL
             SYNC_DECL
             SYNC_FROMHERE
             SYNC_FROMHERE
             client_socks_recv_initiate(client);
             client_socks_recv_initiate(client);
-            DEAD_ENTER(client->dead)
+            DEAD_ENTER(client->dead_client)
             SYNC_COMMIT
             SYNC_COMMIT
-            DEAD_LEAVE2(client->dead)
-            if (DEAD_KILLED) {
+            DEAD_LEAVE2(client->dead_client)
+            if (DEAD_KILLED == -1) {
                 return ERR_ABRT;
                 return ERR_ABRT;
             }
             }
         }
         }