From eb8a3e7a7c3399f0c11fbca7b15e7fc8bfc0483a Mon Sep 17 00:00:00 2001 From: iphydf Date: Fri, 26 Aug 2016 15:51:29 +0100 Subject: [PATCH] Comment out useless TODO'd if block. The condition is a potential use after free, because `connection_kill` before it will delete the `conn` that is dereferenced. --- toxcore/net_crypto.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/toxcore/net_crypto.c b/toxcore/net_crypto.c index 381b0a50..cd100c4a 100644 --- a/toxcore/net_crypto.c +++ b/toxcore/net_crypto.c @@ -2669,12 +2669,15 @@ static void kill_timedout(Net_Crypto *c) continue; connection_kill(c, i); - } +#if 0 + if (conn->status == CRYPTO_CONN_ESTABLISHED) { //TODO: add a timeout here? } + +#endif } }