Parcourir la source

tun2socks: fix typo which might cause a crash if tcp_close() failed due to out of memory (theoretical bug only). Found
with the help of clang static analyzer.

ambrop7 il y a 13 ans
Parent
commit
3f217dcf13
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      tun2socks/tun2socks.c

+ 1 - 1
tun2socks/tun2socks.c

@@ -1204,7 +1204,7 @@ err_t client_recv_func (void *arg, struct tcp_pcb *tpcb, struct pbuf *p, err_t e
         
         int ret = client_free_client(client);
         
-        return (err ? ERR_ABRT : ERR_OK);
+        return (ret ? ERR_ABRT : ERR_OK);
     }
     
     ASSERT(p->tot_len > 0)